Warning Image
I got this warning (image link above) when I installed cordova and ionic. I'm new to this and don't know what this means and if there is something I need to do?
No need to worry since it is a warning, not an error.
The npmconf package is now part of the npm version you are using. When you install ionic or cordova, its package.json file still has a reference to npmconf. Npm ignores it.
Related
I upgraded my node from 14 to 16; and faced this problem while doing npm i, see screenshot to see the problem:
terminal screenshot
I have tried to remove node modules, clearing cache, doing npm i again; didn't help.
Also tried doing npm i --legacy-peer-deps
How can I resolve such dependency conflicts?
The error message itself tells you what the problem is and how you might be able to solve it.
You have sass-loader#8.0.2 installed which has node-sass#^4.0.0 as a peer dependency. But in your root project you have node-sass#^7.0.1 installed.
If you look at the sass-loader changelog, you can see that they added support for node-sass v7 in v12.4.0.
So, your solution seems to be either upgrade sass-loader to v12.4.0 or later (v13.0.2 is the latest), or downgrade node-sass to v4.x.x.
If you run into other problems, the node-sass GitHub page has a troubleshooting guide at https://github.com/sass/node-sass/blob/master/TROUBLESHOOTING.md.
Node v16 comes bundled with a newer version of npm, so your problem most likely stems not from the node version upgrade per se, but from an npm upgrade. From https://github.blog/2021-02-02-npm-7-is-now-generally-available/#peer-dependencies (emphasis mine):
Automatically installing peer dependencies is an exciting new feature introduced in npm 7. In previous versions of npm (4-6), peer dependencies conflicts presented a warning that versions were not compatible, but would still install dependencies without an error. npm 7 will block installations if an upstream dependency conflict is present that cannot be automatically resolved.
To help further troubleshoot this, it would be helpful to know the exact version of node (node --version) and npm (npm --version) you are running, as well as the contents of your package.json and your lockfile (package-lock.json). Although the above info should be enough for you to know why this error occurred (npm v7 breaking change) and what you can do to solve it (upgrade sass-loader).
i am trying to install anugalr2 through npm command "npm install". but when it reaches some point that is in fsevets. the command prompt getting stuck. nothing is happening after that. PFb the cmd image
any suggestions /advice will be helpful
Update :
when i try with npm i --no-optional. it is getting stuck at ""core-js" package
D:\Angular2\quickstart-master>npm i --no-optional
npm WARN deprecated minimatch#0.3.0: Please update to minimatch 3.0.2 or highe
to avoid a RegExp DoS issue
npm WARN deprecated express#2.5.11: express 2.x series is deprecated
npm WARN deprecated connect#1.9.2: connect 1.x series is deprecated
[ ......] - extract:core-js: sill pacote core-js#https://registry.n
after i cleaned npm cache it worked for me
npm cache clean --force
As #RidgeA said in their comment...
Use npm i --no-optional. This will not install optional dependencies, one of which is fsevents. The reason it is getting stuck is because fsevents is written for Mac (see https://www.npmjs.com/package/fsevents).
I can see your path is not that long but in my case a problem was with a too long path.
So the solution was to move project to a location with shorter path, like: D:\my-project\
I managed to install without problems after moving the project to a folder with a shorter path. C:\Themes
After updating npm version I forgot about this problem.
npm won't work if you try to install on USB devices, try changing the directory to your hard drive.
When I download "Intermediate - Advanced users" version of polymer starter kit from github here and on the 4th step of these instructions here I always getting these WARNs:
$ sudo npm install
npm WARN deprecated gulp-minify-css#1.2.4: Please use gulp-clean-css
npm WARN deprecated graceful-fs#3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs#^4.0.0 as soon as possible.
npm WARN engine launchpad#0.5.1: wanted: {"node":"^0.12"} (current: {"node":"4.4.2","npm":"2.15.0"})
npm WARN deprecated lodash#1.0.2: lodash#<3.0.0 is no longer maintained. Upgrade to lodash#^4.0.0.
npm WARN optional dep failed, continuing fsevents#1.0.11
npm WARN deprecated graceful-fs#1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs#^4.0.0 as soon as possible.
npm WARN deprecated jade#0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
No matter what OS I'm using: tried both Ubuntu and Windows (git bash).
I have npm, bower, gulp installed globally but there's always those WARNs.
I think that maybe it's a dependencies problem or it's because of some code in some of polymer starter kit files, but I'm not a pro developer, so I can't find what is causing the problem
It's all seems to work though when I deploy the project, but I'm new to web dev and not sure if I have to just close my eyes on these WARNs
Nothing to worry about with those warnings. Those come from the npm packages that are set as dependencies in the package.json file. When you run npm install it will install all packages set in the package.json. Every single package has their own package.json that also has some dependenices. Each package install their own needed version of that package and sometimes they use older versions of those packages. Only way to get rid of those warnings would be to get the package creators to update their packages.
Only package that you can update yourself is the gulp-minify-css. You can uninstall that package npm remove gulp-minify-css --save-dev and install the newer non-deprecated version gulp-clean-css. npm install gulp-clean-css --save-dev. If you do that you need to update the gulpfile.js for the project to use the new package.
Find the styleTask for the starter-kit in the gulpfile.js:
var styleTask = function(stylesPath, srcs) {
return gulp.src(srcs.map(function(src) {
return path.join('app', stylesPath, src);
}))
.pipe($.changed(stylesPath, {extension: '.css'}))
.pipe($.autoprefixer(AUTOPREFIXER_BROWSERS))
.pipe(gulp.dest('.tmp/' + stylesPath))
.pipe($.minifyCss())
.pipe(gulp.dest(dist(stylesPath)))
.pipe($.size({title: stylesPath}));
};
and change the .pipe($.minifyCss()) row to be .pipe($.cleanCss({compatibility: 'ie10'}))
Now you have managed to update the starter-kit to use newer non-deprecated package.
Many packages in the npm package manager have some deprecated packages or cause other warnings while installing but most of the time there is no need to worry.
No need to worry about those warnings in this case. They shouldn't cause the problems that you allude to. I verified the PSK guide you mentioned (the page completely appears and functions without error in Chrome Version 49.0.2623.112 on OSX El Capitan).
npm displays deprecation warnings when a dependency being installed has been deprecated by the dependency's package owner/maintainer usually in favor of another package/version that has significant improvements. Packages can be deprecated/undeprecated at will and long after your app has been deployed.
For example, in January, you release an app that depends on gulp-minify-css#1.2.4. The owner of gulp-minify-css no longer has time to maintain the package, so he decides in March to deprecate it in favor of the actively maintained gulp-clean-css. Now, users who npm install your app (which also installs gulp-minify-css) see this deprecation warning, but your app still functions normally. The deprecation does not invalidate your app or cause errors.
While normally one might try to upgrade the dependencies to remove the warnings, that is not recommended for PSK due to package incompatibilities as recently discovered in a pull request:
So I just took this for a spin and I ran into some issues :( although
the current gulp plugins are deprecated they are working for the
community! This PR represents a "high risk" change, that we have found
to be breaking in several odd ways. For that reason I am going to
close this PR for now. That said let's revisit this PR in a few months
and see if things have stabilized more.
I am installing a module globally
$ npm install -g X
and NPM says
"npm WARN deprecated lodash#1.0.2: lodash#<3.0.0 is no longer
maintained. Upgrade to lodash#^4.0.0"
how can I find out which module has an dependency on this old version of lodash?
The warning message from NPM doesn't seem to give me any clue which module references this old version (I believe that the module X does not have a direct dependency on this old version of lodash.).
I got an answer for the similar question: https://stackoverflow.com/a/36335866/1115187
Briefly:
npm outdated --depth=3
This command will analyze installed NPM-packages and their versions. The report will contain:
package name
latest version
current version
dependency path (down to depth level)
Hope, this information could help you to gather info about outdated packages.
Next step - get in touch with maintainers of the appropriate package, and ask them to update the package (maybe, you would like to send a pull request).
UPD: npm-check
There is a great npm package: npm-check, that allows checking outdated dependencies. Probably
My favorite feature: Interactive Update — run npm-check -u in the project folder. An interactive menu shows all required information about dependencies in the current folder and allows to update all dependencies in 3 seconds.
npm la <package-name>
also works, and will give you the most details about the dependency graph of a dependency.
npm ls <package-name>, does something similar but gives you less details
Use npm list. It will print out all of the packages your module depends on as well as your dependencies dependencies and so forth. Maybe redirect output to a file or grep it so you can search it more easily.
use this
sudo npm install --unsafe-perm -g expo-cli
You could search through all the package.json files under node_modules and see which ones are dependent on lodash 1.0.2.
For deprecated files you should use the "npm i [package]" syntax, in this case you should use: npm i X and it will fetch all necessary packages, including deprecated ones, but which are required for your installation.
Npm documentation link: https://docs.npmjs.com/using-deprecated-packages
I am trying to install Satellizer.
But getting error.
Can you guide me to understand whats this error is, and how can I fix this.
I have node version v5.1.0 and npm version 3.5.2
Looks like you have the Satellizer as a decency inside your package.json
Or
That the project name is the same of one your depended package(s)
If it not a depended package, there used to be some error with npm v3.5.X so try to update your npm version and then re-install it.
I would also recommend to test it with node v4.X since v5 might contain those kind of bugs