⽤npminstall-g@vuecli安装脚⼿架,遇到报错
npmERR!Maximumc。。。
⼀开始安装报错,百度出来那些办法都⽤尽了,在这⾥分享⼀下遇到这两个问题怎么处理。
(⼀)下载最新的npm npm install npm -g
不⾏就先跳过,执⾏下⾯命令
(⼆)
npm cache clean --force
npm i -g npm
不⾏再试⼀遍这些
npm ls --depth 0 -g // 看看哪些失效了
npm prune -g // 修剪下全局包
npm rebuild -g // 重建下全局包
npm update -g // 更新下全局包的版本
npm cache clear --force -g // 删除全局包的缓存(慎重)
PS E:\VueCli\iMac> npm install -g @vue/cli
npm ERR! Maximum call stack size exceeded
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Urs\ur\AppData\Roaming\npm-cache\_logs\2020-09-12T14_20_54_992Z-debug.log
下⾯是我成功安装的过程
chevrolerPS E:\VueCli\iMac> npm install -g @vue/cli
npm WARN deprecated @hapi/joi@15.1.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/address@2.1.4: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN @vue/compiler-sfc@3.0.0-rc.10 requires a peer of vue@3.0.0-rc.10 but none is installed. You must install peer dependencies yourlf.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fvents@1.2.13 (node_modules\@vue\cli\node_modules\fvents):
爬树课npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fvents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! Maximum call stack size exceeded
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Urs\ur\AppData\Roaming\npm-cache\_logs\2020-09-12T14_20_54_992Z-debug.log
PS E:\VueCli\iMac> ^C
PS E:\VueCli\iMac> npm cache clean --force
npm WARN using --force I sure hope you know what you are doing.
PS E:\VueCli\iMac> npm i -g npm npm ERR! code EEXIST
npm ERR! path C:\d
npm ERR! Refusing to delete C:\d: is outside C:\Node\node_modules\npm and not a link
npm ERR! File exists: C:\d
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:\Urs\ur\AppData\Roaming\npm-cache\_logs\2020-09-12T14_22_22_339Z-debug.log
PS E:\VueCli\iMac> npm ls --depth 0 -g
C:\Node
+-- npm@6.14.6
`-- nrm@1.2.1
npm ERR! missing: is-docker@2.1.1, required by open@7.1.0
npm ERR! missing: is-docker@2.1.1, required by is-wsl@2.2.0
PS E:\VueCli\iMac> npm prune -g
cottonfieldnpm WARN enoent ENOENT: no such file or directory, open 'E:\VueCli\iMac\package.json'
npm WARN . No description
npm WARN . No repository field.
npm WARN . No README data
npm WARN . No licen field.
up to date in 0.292s
PS E:\VueCli\iMac> npm rebuild -g
the girl next door
C:\Node\coffee -> C:\Node\node_modules\coffee-script\bin\coffee
C:\Node\cake -> C:\Node\node_modules\coffee-script\bin\cake
npm ERR! code EEXIST
npm ERR! path C:\Node\node_modules\sshpk\bin\sshpk-conv
npm ERR! dest C:\d
npm ERR! EEXIST: file already exists, cmd shim 'C:\Node\node_modules\sshpk\bin\sshpk-conv' -> 'C:\d' npm ERR! File exists: C:\d
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:\Urs\ur\AppData\Roaming\npm-cache\_logs\2020-09-12T14_23_21_561Z-debug.log
PS E:\VueCli\iMac> npm update -g
npm ERR! code EEXIST
npm ERR! path C:\d
npm ERR! Refusing to delete C:\d: is outside C:\Node\node_modules\npm and not a link
npm ERR! File exists: C:\d
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:\Urs\ur\AppData\Roaming\npm-cache\_logs\2020-09-12T14_23_45_788Z-debug.log
PS E:\VueCli\iMac> vue -v
vue : ⽆法将“vue”项识别为 cmdlet、函数、脚本⽂件或可运⾏程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试⼀次。
所在位置⾏:1 字符: 1
+ vue -vsaluki
+ ~~~
+ CategoryInfo : ObjectNotFound: (vue:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS E:\VueCli\iMac> npm install -g vue-cli
npm WARN deprecated vue-cli@2.9.6: This package has been deprecated in favour of @vue/cli
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm ERR! code EEXIST
npm ERR! path C:\Node\node_modules\sshpk\bin\sshpk-conv
npm ERR! dest C:\d
npm ERR! EEXIST: file already exists, cmd shim 'C:\Node\node_modules\sshpk\bin\sshpk-conv' -> 'C:\d' npm ERR! File exists: C:\d
副词修饰动词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:\Urs\ur\AppData\Roaming\npm-cache\_logs\2020-09-12T15_02_05_361Z-debug.log
PS E:\VueCli\iMac> npm install -g vue-cli --force
npm WARN using --force I sure hope you know what you are doing.
npm WARN deprecated vue-cli@2.9.6: This package has been deprecated in favour of @vue/cli
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
C:\Node\sshpk-conv -> C:\Node\node_modules\sshpk\bin\sshpk-conv
C:\Node\sshpk-sign -> C:\Node\node_modules\sshpk\bin\sshpk-sign
C:\Node\sshpk-verify -> C:\Node\node_modules\sshpk\bin\sshpk-verify
C:\Node\uuid -> C:\Node\node_modules\uuid\bin\uuid
C:\Node\vue-init -> C:\Node\node_modules\vue-cli\bin\vue-init
C:\Node\vue -> C:\Node\node_modules\vue-cli\bin\vue
C:\Node\vue-list -> C:\Node\node_modules\vue-cli\bin\vue-list
+ vue-cli@2.9.6
added 236 packages from 204 contributors in 12.926s
PS E:\VueCli\iMac> vue -v
error: unknown option `-v'
PS E:\VueCli\iMac> vue -v
error: unknown option `-v'
PS E:\VueCli\iMac> npm install -g vue-cli
npm WARN deprecated vue-cli@2.9.6: This package has been deprecated in favour of @vue/cli
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm ERR! code EEXIST
npm ERR! path C:\Node\node_modules\sshpk\bin\sshpk-conv
npm ERR! dest C:\d
npm ERR! EEXIST: file already exists, cmd shim 'C:\Node\node_modules\sshpk\bin\sshpk-conv' -> 'C:\d'
npm ERR! File exists: C:\d
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:\Urs\ur\AppData\Roaming\npm-cache\_logs\2020-09-12T15_03_39_665Z-debug.log
PS E:\VueCli\iMac> npm install -g @vue/cli --force
npm WARN using --force I sure hope you know what you are doing.
npm WARN deprecated @hapi/joi@15.1.1: This version has been deprecated and is no longer supported or maintained词根词缀大全
npm WARN deprecated @hapi/address@2.1.4: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
C:\Node\is-docker -> C:\Node\node_modules\is-docker\cli.js
C:\Node\sshpk-sign -> C:\Node\node_modules\sshpk\bin\sshpk-sign
C:\Node\sshpk-verify -> C:\Node\node_modules\sshpk\bin\sshpk-verifyfirst blood
C:\Node\sshpk-conv -> C:\Node\node_modules\sshpk\bin\sshpk-conv
C:\Node\uuid -> C:\Node\node_modules\uuid\bin\uuid
C:\Node\vue -> C:\Node\node_modules\@vue\cli\bin\vue.js
> fvents@1.2.13 install C:\Node\node_modules\@vue\cli\node_modules\fvents
> node install.js
Skipping 'fvents' build as platform win32 is not supported
> core-js@3.6.5 postinstall C:\Node\node_modules\@vue\cli\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"
Thank you for using core-js ( /zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Plea consider supporting of core-js on Open Collective or Patreon:
> /core-js
> /zloirock
Also, the author of core-js ( /zloirock ) is looking for a good job -)
> @apollo/protobufjs@1.0.5 postinstall C:\Node\node_modules\@vue\cli\node_modules\@apollo\protobufjs
> node scripts/postinstall
> nodemon@1.19.4 postinstall C:\Node\node_modules\@vue\cli\node_modules\nodemon
> node bin/postinstall || exit 0
Love nodemon? You can now support the project via the open collective:
> /nodemon/donate
> ejs@2.7.4 postinstall C:\Node\node_modules\@vue\cli\node_modules\ejs
> node ./postinstall.js
company的用法
Thank you for installing EJS: built with the Jake JavaScript build tool (/)
npm WARN @vue/compiler-sfc@3.0.0-rc.10 requires a peer of vue@3.0.0-rc.10 but none is installed. You must install peer dependencies yourlf.
+ @vue/cli@4.5.6
added 1322 packages from 705 contributors in 98.559s
PS E:\VueCli\iMac> vue -v
Usage: vue <command> [options]
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
create [options] <app-name> create a new project powered by vue-cli-rvice
add [options] <plugin> [pluginOptions] install a plugin and invoke its generator in an already created project
invoke [options] <plugin> [pluginOptions] invoke the generator of a plugin in an already created project
inspect [options] [] inspect the webpack config in a project with vue-cli-rvice
rve [options] [entry] rve a .js or .vue file in development mode with zero config
build [options] [entry] build a .js or .vue file in production mode with zero config
ui [options] start and open the vue-cli ui
init [options] <template> <app-name> generate a project from a remote template (legacy API, requires @vue/cli-init)
config [options] [value] inspect and modify the config
over drive
outdated [options] (experimental) check for outdated vue cli rvice / plugins
upgrade [options] [plugin-name] (experimental) upgrade vue cli rvice / plugins
migrate [options] [plugin-name] (experimental) run migrator for an already-installed cli plugin
info print debugging information about your environment Run vue <command> --help for detailed usage of given command.
Unknown option -v.
PS E:\VueCli\iMac> vue -V
@vue/cli 4.5.6
PS E:\VueCli\iMac>