npm WARN read-shrinkwrap This version of npm is compatible with
lockfileVersion@1, but npm-shrinkwrap.json was generated for
lockfileVersion@0. I'll try to do my best with it!
npm ERR! code ETARGET
npm ERR! notarget No matching version found for sockjs-client@0.0.0-
unreleasable
npm ERR! notarget In most cases you or one of your dependencies are
requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'shoe'
npm ERR! notarget
npm ERR! A complete log of this run can be found in:
npm ERR! /home/node/.npm/_logs/2018-08-27T12_19_24_084Z-debug.log
i got this Error While installing packages it dont let me install packages please Help.
Thanks in Advance
try out below steps to resolve that error
step 1 - remove your node_modules folder
rm -rf node_modules
step 2 -
npm cache clean
step 3 -
sudo apt-get install build-essential
step 4 - remove your package-lock.json and install node modules again.
npm install
(if there is EACCESS error comes then try with sudo command.)
One cause of “code ETARGET” “notarget No matching version found for express@4.17.1” (when running npm update
) is prefer-offline=true
in npm configuration, which causes npm (specifically npm-registry-cache ) to never update its HTTP cache if an existing resource was fetched. prefer-offline
can be useful to speed up npm ci
, but if you use it for npm update
, then npm
/ pacote will cache package metadata requests aka packuments (eg GET https://registry.npmjs.org/express ) forever and will not be able to update to the newest version. So if you have any of prefer-offline=true
, cache-min=9999
, offline=true
set in the npm CLI flags, environment variables , or npmrc files ( /path/to/my/project/.npmrc
, ~/.npmrc
, etc.), then don't forget to remove them when performing npm update
and npm install
.
So the takeaways as far as I can tell are:
--prefer-offline
when you run npm install
, npm update
, npm outdated
etc., then occasionally remove --prefer-offline
or npm cache clean
.npm ci --prefer-offline
instead of npm install --prefer-offline
when doing continuous buildsI solved the issue by
package-lock.json
filenpm install
npm start
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.