I getting this error while install any module from npm and also not work with yarn.
I don't know where is the problem!
Update NPM like :
npm update
Also i suggest you do with -g
"npm update -g" it will update globally installed packages.
Related
i got this error when run command "npm install && npm run dev" on my project.
I have tried to run the command "npm install" and i get the other error.
enter image description here
You have to run:
npm install; npm run dev
The && operation in CLI only works in CMD on Windows. In Powershell you have to use a semicolon instead.
First try to update your nodejs version
npm install -g node
And then install cross-env globally
npm install --global cross-env
Finally install latest autoprefixer or 9.8.0 and run dev
npm install autoprefixer#9.8.0
npm install && run dev
The error you are getting is due to && operation in CLI, first of all, you have to install all dependencies using npm install and then you are allowed to run dev mode.
For real-time compiling you can use npm run watch instead of npm run dev.
Make sure you have installed node.js within your pc.
I am running sudo npm install -g serverless.
Error:
npm WARN deprecated mkdirp#0.5.4: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm ERR! Unexpected end of JSON input while parsing near '...:{"name":"#babel/pars'
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/AC/.npm/_logs/2020-03-30T21_11_07_100Z-debug.log
If you are using Windows:
Open Windows Powershell as admin
npm cache clean --force: Clear cache
If you are using Linux/Mac:
sudo -i: For admin privileges
npm cache clean --force
Use this:
sudo npm install -g --unsafe-perm=true --allow-root serverless
I ran
npm install --save-dev to install dev dependencies, which finished successfully but why there is no entry shown in package.json related to this command.
I just checked that if I removed "-g" option from the command
npm install -g grunt --save-dev it works properly -
so basically removing the global option from the command it is updating the package.json correctly.
I try to run npm install browserify both locally and globally (-g)
but I always got the follow errors
npm ERR! peerinvalid The package bn.js does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer miller-rabin#1.1.2 wants bn.js#^0.16.0
npm ERR! System Darwin 14.0.0
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "browserify"
npm ERR! cwd /Users/kanitw/Dropbox/_Projects/_idl/_visrec/vegalite
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! code EPEERINVALID
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/kanitw/Dropbox/_Projects/_idl/_visrec/vegalite/npm-debug.log
npm ERR! not ok code 0
Not sure how to solve it.
(My node version is v0.10.24, I'm on OSX Yosemite)
In order to make the workaround work, you have to
Delete the existing node_modules folder.
npm install miller-rabin#1.1.1 --save-peer
npm install browserify
That works guaranteed.
Had the same issue on Linux. Try running npm update -g
before installing browserify. This has worked for me.
This commit introduced the breaking change: https://github.com/indutny/miller-rabin/commit/bb85f555974587a410a17173f0bc484133b53cb7
The author of the library should fix it, but meanwhile you can:
Delete the existing node_modules folder
npm install miller-rabin#1.1.1 --save-peer
npm install browserify
Recently found this issue on browserify's github.
https://github.com/substack/node-browserify/issues/1049
There is a workaround described.
There are details of a workaround list in the issues on the github page
Error listing
To summarise the solution posted in the issue, you need to install miller-rabin#1.1.1 as a peer-dependency in your own project (npm install miller-rabin#1.1.1 --save-peer) that makes sure the bn.js#0.15 is used rather than the more recent version.
Hope that helps!
Try zipping your existing node_modules and package.json, then delete them.
You may need to 1st generate a new package.json using:
npm init
Then install browserify locally:
npm install browserify
Also, you'll have to install browserify globally:
npm install browserify -g
To zip on CMD or terminal refer to the following article:
How to zip a file using cmd line?
I am currently on npm version 1.2.32. When I run the following:
npm update npm -g
I get the following output:
npm WARN package.json cheerio-select#0.0.3 No repository field.
npm WARN package.json cli-table#0.2.0 No repository field.
npm WARN package.json assert-plus#0.1.2 No repository field.
npm WARN package.json ctype#0.5.2 No repository field.
Then when I check version afterwards using npm -v, it hasn't updated. Is there something else I need to do?
Found the Fancy Windows Install in the docs:
Download zip from http://nodejs.org/dist/npm/
Unpack in the same folder where node.exe lives