npm ERR! Response timeout while trying to fetch。。。。。。 npm ERR! EEXIST: file already exists

一、npm ERR! Response timeout while trying to fetch https://registry.npmjs.org/typescript (over 30000ms)


$ vue -V
2.9.6

$ npm uninstall vue-cli -g
removed 239 packages in 8.928s

$ vue -V
bash: /c/Program Files/nodejs/vue: No such file or directory


$ vue --version
bash: /c/Program Files/nodejs/vue: No such file or directory




$ npm install -g @vue/cli
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! Response timeout while trying to fetch https://registry.npmjs.org/typescript (over 30000ms)

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\firesky\AppData\Roaming\npm-cache\_logs\2020-06-04T15_06_15_126Z-debug.log


$ npm config set strict-ssl false

这样就安装成功了!

$ npm install -g @vue/cli
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
C:\Program Files\nodejs\vue -> C:\Program Files\nodejs\node_modules\@vue\cli\bin\vue.js

> [email protected] postinstall C:\Program Files\nodejs\node_modules\@vue\cli\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> @apollo/[email protected] postinstall C:\Program Files\nodejs\node_modules\@vue\cli\node_modules\@apollo\protobufjs
> node scripts/postinstall


> [email protected] postinstall C:\Program Files\nodejs\node_modules\@vue\cli\node_modules\nodemon
> node bin/postinstall || exit 0

Love nodemon? You can now support the project via the open collective:
 > https://opencollective.com/nodemon/donate


> [email protected] postinstall C:\Program Files\nodejs\node_modules\@vue\cli\node_modules\ejs
> node ./postinstall.js

Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)

npm WARN [email protected] requires a peer of @babel/preset-env@^7.1.6 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\@vue\cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ @vue/[email protected]
added 1104 packages from 662 contributors in 197.127s

$ vue --version
@vue/cli 4.4.1


二、npm ERR! EEXIST: file already exists

上面是vue-cli4.x,但是想安装vue-cli3.x。卸载重装

$ npm uninstall -g @vue/cli
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
removed 1104 packages in 17.051s

$ vue --versioon
bash: /c/Program Files/nodejs/vue: No such file or directory
$ npm install -g @vue/[email protected]
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN rollback Rolling back [email protected] failed (this is probably harmless): EPERM: operation not permitted, scandir 'C:\Program Files\nodejs\node_modules\@vue\cli\node_modules'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\@vue\cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code EEXIST
npm ERR! path C:\Program Files\nodejs\node_modules\@vue\cli\bin\vue.js
npm ERR! dest C:\Program Files\nodejs\vue
npm ERR! EEXIST: file already exists, cmd shim 'C:\Program Files\nodejs\node_modules\@vue\cli\bin\vue.js' -> 'C:\Program Files\nodejs\vue'
npm ERR! File exists: C:\Program Files\nodejs\vue
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\firesky\AppData\Roaming\npm-cache\_logs\2020-06-04T15_49_43_969Z-debug.log

重点在这个(把提示已存在的相关文件删除掉):

npm ERR! EEXIST: file already exists, cmd shim 'C:\Program Files\nodejs\node_modules\@vue\cli\bin\vue.js' -> 'C:\Program Files\nodejs\vue'
npm ERR! File exists: C:\Program Files\nodejs\vue
npm ERR! Remove the existing file and try again, or run npm

删除后再重新安装即可,如下:

$ npm install -g @vue/[email protected]
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
C:\Program Files\nodejs\vue -> C:\Program Files\nodejs\node_modules\@vue\cli\bin\vue.js

> [email protected] postinstall C:\Program Files\nodejs\node_modules\@vue\cli\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> @apollo/[email protected] postinstall C:\Program Files\nodejs\node_modules\@vue\cli\node_modules\@apollo\protobufjs
> node scripts/postinstall


> [email protected] postinstall C:\Program Files\nodejs\node_modules\@vue\cli\node_modules\nodemon
> node bin/postinstall || exit 0


> [email protected] postinstall C:\Program Files\nodejs\node_modules\@vue\cli\node_modules\ejs
> node ./postinstall.js

Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\@vue\cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ @vue/[email protected]
added 710 packages from 557 contributors in 128.494s

$ vue -V
3.3.0

你可能感兴趣的:(Vue-cli,构建工具,Vue-cli,构建工具)