VUE project install dependency package, error as follows:
$ npm install
npm WARN registry Using stale data from https://registry.npmjs.org/ because the host is inaccessible -- are you offline?
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/vue-router/-/vue-router-3.3.4.tgz failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/luminal/.npm/_logs/2020-07-03T04_12_04_809Z-debug.log
Solution:
$ npm config get proxy
null
$ npm config get https-proxy
null
$ npm config set proxy null
$ npm config set https-proxy null
$ npm config set registry http://registry.cnpmjs.org/
$ npm install -g cnpm --registry=https://registry.npm.taobao.org
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
/Users/luminal/.nvm/versions/node/v10.16.0/bin/cnpm -> /Users/luminal/.nvm/versions/node/v10.16.0/lib/node_modules/cnpm/bin/cnpm
+ [email protected]
updated 5 packages in 12.316s
$ cnpm i
bash: cnpm: command not found
$ cnpm install
bash: cnpm: command not found
$ nvm use v10.16.0
Now using node v10.16.0 (npm v6.9.0)
$ cnpm i
⠧ [6/23] Installing uniqs@^2.0.0
WARN node unsupported "[email protected]" is incompatible with [email protected] › [email protected] › [email protected] › watchpack-chokidar2@^2.0.0, expected node@<8.10.0
✔ Installed 23 packages
✔ Linked 750 latest versions
Having previously managed the Node version using NVM, you need to specify the following version: NVM USE v10.16.0
Then use CNPM I or CNPM install
Reference link:
NPM installs an error solution for any package
Read More:
- Solve NPM err! code 128
- Solution of NPM err! Code elifecycle
- Error “NPM err” when starting Vue project! code ELIFECYCLE”
- The solution of NPM err! Code elifecycle
- NPM run dev error (ERR: Code lifecycle)
- NPM run serve reported an error “NPM err! Missing script: start”
- npm ERR! Error: CERT_ Untrusted problem solving
- gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildPr
- Pull code execution NPM install error code: 128
- NPM ERR! Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’
- npm ERR Error: EPERM:operation not permitted, rename
- NPM install error | gyp err! Configure error
- “NPM err! Error: eperm: operation not permitted” problem solving
- NPM run build failed to package err! Missing script: build
- NPM install error: gyp err! Configure error
- npm ERR! registry error parsing json error report solution
- Error code elifecycle errorno when NPM install command is executed in Vue project
- 【ipfs-api】npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.
- NPM err! Invalid name: “{{name}} in nuxt installation in p166 of Shangsi Valley online education project“
- npm ERR! Error: EPERM: operation not permitted, open ‘C:\Program Files\nodejs\node_ Solution to cache / xxx