Resolve Warning given for CommonJS or AMD dependencies - angularjs

I am getting the following warning in my terminal. How can I solve this ? (remove the warning)
Warning: C:\Users\Sharon\Documents\MyProject\PROJECTOne\node_modules\#azure\core-tracing\dist-esm\src\interfaces.js depends on '#opentelemetry/api'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

This is a known issue that older version of #opentelemetry/api doesn't support ESM. https://github.com/Azure/azure-sdk-for-js/issues/11550. The warning should be gone once the #azure/storage-blob releases a new version that contains the fix.

You can remove CommonJS or AMD dependencies can cause optimization bailouts..... by adding below code snippet in to build section of your angular.json
"allowedCommonJsDependencies": [
"opentelemetry",
]
reply me if it not works

Related

Three.JS react-three-fibre vite build failed

i've been working a bit with ThreeJS but can't get it to build.
After some time put into this without any results whatsoever i wanted to ask if any of you know what's wrong.
Project: I made some basic gltf models using blender and want to display/ manipulate them later on. For now they are basically just displayed.
It works on the dev server but tsc returnes multiple errors.
Errors are for example:
type declarations not found (despite the needed #types dependencies beeing present)
type constraint violations in node_modules
What am i missing?
Disclaimer: I am new to both React and ThreeJS.
Repo Link
Changing "skipLibCheck": true in my tsconfig.json from false to true fixed this issue for me.
React-three-fiber is most likely built with a less-strict tsconfig which causes this issue to occur.
Warning: --skipLibCheck degrades type checking, and ideally we wouldn't use it. But not every library provides perfect types yet, so skipping it can be nice.

Expected a string, got object gatsby-plugin-prettier-eslint Gatsby

I am trying to learn Gatsby and I included prettier-eslint plugin with a common configuration. You can see my configuration, the files, etc
When I try to add a css file I get this error:
Have you tried using the following?
eslint: {
patterns: "**/*.{js,jsx,ts,tsx}",
customOptions: {
fix: true,
cache: true,
},
},
The eslint pattern seems to be a string, not an array according to the plugin's example.
This seems to be an unresolved issue of the plugin, according to this opened issue (from a week ago), so keep an eye on that stack trace to see how it evolves. If the dependency has a bug when using the defaults (and suggested) configuration, there's nothing you can do except making a PR if you are able to spot the bug in the source code or wait for the resolution.
I had the same issue. Turns out you must have a prettier config (.prettierrc or similar) set up. Check to make sure you have a config as mentioned in the Prettier docs.

You may need an additional loader to handle the result of these loaders error with CRA

I installed a package called "dids", which I believe contains another package "did-jwt" that is causing this error:
Module parse failed: Unexpected token (192:53)
File was processed with these loaders:
* ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
| return t.find(e => {
| const r = p(I(e));
> return r === i || r === c || e.ethereumAddress?.toLowerCase() === u || e.blockchainAccountId?.split("#eip155")?.[0].toLowerCase() === u;
| });
| }).filter(e => null != e);
I started looking into webpack, babel, and what goes on behind CRA, since I saw the error was with loaders, babel, and webpack. I'd never looked into the toolchain before since I've only been using React for a bit. I have a better understanding of the problem, but am still confused why its happening, and how to solve it? I looked into running npm run eject but only wish to use that as a last resort.
My current understanding is that webpack compiles and bundles the JS code, and Babel transpiles the code to transform more modern JS into older JS so its understandable by older browsers. (feel free to correct me on this, my understanding still rusty). Webpack uses loaders while bundling and calls upon loaders to do certain thing, like babel to transpile. But in this case, why can babel not compile this piece of code?
I also saw this post: "You may need an additional loader to handle the result of these loaders."
Which explains that babel doesn't run on dependencies in the project, only the source code. But it seems that babel lis running on the did-jwt dependency?
Dor your very special case (did-jwt) you might be able to use an older release of did-jwt (just made it work on my machine with v5.1.0 for example). When did-jwt is a transitive dependency and you're using yarn, you could put this in your package.json:
"resolutions": {
"did-jwt": "5.1.0"
},

Migrating to `prop-types` causes warning on context usage

After upgrading to react 15.6.0 (or 15.5.x for that matter) and replacing usage of React.PropTypes with prop-types package I'm getting an error when using my library (inversify-react):
Warning: Failed context type: Calling PropTypes validators directly is not supported by
the `prop-types` package. Use PropTypes.checkPropTypes() to call them.
It seems that the error is caused by context usage, however libraries like react-router which also use context don't seem to have this problem. Did anyone encounter similar issue? Any hints how to avoid the warning?
Library source code: https://github.com/kukkimonsuta/inversify-react
Sample source code: https://github.com/kukkimonsuta/inversify-react-sample
Live sample: https://inversify-react-sample.herokuapp.com/
The cause of the warning was mistake on my part where I accidentally bundled prop-types into the library instead of only using it as dependency.

What is the difference between "configuration: 'android-endpoints'" and "configuration: 'endpoints'" in build.gradle in Android Studio?

In my app module (which depends on my backend endpoints module), I have the following
dependencies {
compile project(path: ':backend', configuration: 'android-endpoints')
}
But the following also works.
dependencies {
compile project(path: ':backend', configuration: 'endpoints')
}
I see that the generated .jar file dependency has the "android" appended to its name in the former case. However, I suspect there is a more fundamental difference between the two. Does anyone know?
I found the following cryptic reference here:
https://github.com/GoogleCloudPlatform/gradle-appengine-plugin
search for "How do I use a compile dependency on my endpoints client libraries from another project?" in the FAQ section.
Thanks for your help and I hope this isn't a stupid question.
android-endpoints adds few a extra transitive dependencies to the artifact that are required to use endpoints with android, it also removes some that are already included with android.
included : "google-api-client-android"
excluded : "org.apache.httpcomponents:httpclient"
endpoints only adds "google-api-client" and doesn't exclude anything.

Resources