`npm install -g vue-cli` throw an error
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! /Users/hadb/.npm/_logs/2017-06-16T02_27_54_896Z-debug.log
log:
0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', 1 verbose cli '/usr/local/bin/npm', 1 verbose cli 'install', 1 verbose cli '-g', 1 verbose cli 'vue-cli' ] 2 info using [email protected] 3 info using [email protected] 4 verbose npm-session 4a495c3f3731d46a 5 silly install loadCurrentTree 6 silly install readGlobalPackageData 7 http fetch GET 304 https://registry.npmjs.org/vue-cli 372ms (from cache) 8 silly pacote tag manifest for vue-cli@latest fetched in 420ms 9 verbose stack RangeError: Maximum call stack size exceeded 9 verbose stack at exports.create (/usr/local/lib/node_modules/npm/lib/install/node.js:33:25) 9 verbose stack at /usr/local/lib/node_modules/npm/lib/install/node.js:36:14 9 verbose stack at Array.forEach (native) 9 verbose stack at exports.create (/usr/local/lib/node_modules/npm/lib/install/node.js:33:25) 9 verbose stack at /usr/local/lib/node_modules/npm/lib/install/node.js:36:14 9 verbose stack at Array.forEach (native) 9 verbose stack at exports.create (/usr/local/lib/node_modules/npm/lib/install/node.js:33:25) 9 verbose stack at normalizeTree (/usr/local/lib/node_modules/npm/lib/install.js:377:5) 9 verbose stack at Array.forEach (native) 9 verbose stack at normalizeTree (/usr/local/lib/node_modules/npm/lib/install.js:379:19) 9 verbose stack at Array.forEach (native) 9 verbose stack at normalizeTree (/usr/local/lib/node_modules/npm/lib/install.js:379:19) 9 verbose stack at Array.forEach (native) 9 verbose stack at normalizeTree (/usr/local/lib/node_modules/npm/lib/install.js:379:19) 9 verbose stack at Array.forEach (native) 9 verbose stack at normalizeTree (/usr/local/lib/node_modules/npm/lib/install.js:379:19) 10 verbose cwd /Users/hadb 11 verbose Darwin 16.6.0 12 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "vue-cli" 13 verbose node v8.1.2 14 verbose npm v5.0.3 15 error Maximum call stack size exceeded 16 verbose exit [ 1, true ]
+1
on my macOS High Sierra and node v8.1.2 and npm 5.0.3 , this error: 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! /Users/langge/.npm/_logs/2017-06-17T00_07_44_979Z-debug.log
0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/Cellar/node/8.1.2/bin/node', 1 verbose cli '/usr/local/bin/npm', 1 verbose cli 'install', 1 verbose cli '-g', 1 verbose cli 'vue-cli' ] 2 info using [email protected] 3 info using [email protected] 4 verbose npm-session 0e2a958d086d9f1f 5 silly install loadCurrentTree 6 silly install readGlobalPackageData 7 http fetch GET 304 https://registry.npmjs.org/vue-cli 496ms (from cache) 8 silly pacote tag manifest for vue-cli@latest fetched in 531ms 9 verbose stack RangeError: Maximum call stack size exceeded 9 verbose stack at exports.create (/usr/local/lib/node_modules/npm/lib/install/node.js:33:25) 9 verbose stack at /usr/local/lib/node_modules/npm/lib/install/node.js:36:14 9 verbose stack at Array.forEach (native) 9 verbose stack at exports.create (/usr/local/lib/node_modules/npm/lib/install/node.js:33:25) 9 verbose stack at /usr/local/lib/node_modules/npm/lib/install/node.js:36:14 9 verbose stack at Array.forEach (native) 9 verbose stack at exports.create (/usr/local/lib/node_modules/npm/lib/install/node.js:33:25) 9 verbose stack at normalizeTree (/usr/local/lib/node_modules/npm/lib/install.js:377:5) 9 verbose stack at Array.forEach (native) 9 verbose stack at normalizeTree (/usr/local/lib/node_modules/npm/lib/install.js:379:19) 9 verbose stack at Array.forEach (native) 9 verbose stack at normalizeTree (/usr/local/lib/node_modules/npm/lib/install.js:379:19) 9 verbose stack at Array.forEach (native) 9 verbose stack at normalizeTree (/usr/local/lib/node_modules/npm/lib/install.js:379:19) 9 verbose stack at Array.forEach (native) 9 verbose stack at normalizeTree (/usr/local/lib/node_modules/npm/lib/install.js:379:19) 10 verbose cwd /Users/langge/dev/test/h5js/webtest/vue-Meizi 11 verbose Darwin 17.0.0 12 verbose argv "/usr/local/Cellar/node/8.1.2/bin/node" "/usr/local/bin/npm" "install" "-g" "vue-cli" 13 verbose node v8.1.2 14 verbose npm v5.0.3 15 error Maximum call stack size exceeded 16 verbose exit [ 1, true ]
Cannot reproduce with same versions
+1
npm ERR! Maximum call stack size exceeded
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/zyx/.npm/_logs/2017-07-18T12_31_53_059Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/8.1.2/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'i',
1 verbose cli '-g',
1 verbose cli 'vue-cli' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session 8cc4c68874eadce1
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 200 https://registry.npmjs.org/vue-cli 25ms (from cache)
8 silly pacote tag manifest for vue-cli@latest fetched in 53ms
9 verbose stack RangeError: Maximum call stack size exceeded
9 verbose stack at exports.create (/usr/local/lib/node_modules/npm/lib/install/node.js:31:40)
9 verbose stack at /usr/local/lib/node_modules/npm/lib/install/node.js:36:14
9 verbose stack at Array.forEach (native)
9 verbose stack at exports.create (/usr/local/lib/node_modules/npm/lib/install/node.js:33:25)
9 verbose stack at /usr/local/lib/node_modules/npm/lib/install/node.js:36:14
9 verbose stack at Array.forEach (native)
9 verbose stack at exports.create (/usr/local/lib/node_modules/npm/lib/install/node.js:33:25)
9 verbose stack at normalizeTree (/usr/local/lib/node_modules/npm/lib/install.js:377:5)
9 verbose stack at Array.forEach (native)
9 verbose stack at normalizeTree (/usr/local/lib/node_modules/npm/lib/install.js:379:19)
9 verbose stack at Array.forEach (native)
9 verbose stack at normalizeTree (/usr/local/lib/node_modules/npm/lib/install.js:379:19)
9 verbose stack at Array.forEach (native)
9 verbose stack at normalizeTree (/usr/local/lib/node_modules/npm/lib/install.js:379:19)
9 verbose stack at Array.forEach (native)
9 verbose stack at normalizeTree (/usr/local/lib/node_modules/npm/lib/install.js:379:19)
10 verbose cwd /Users/zyx
11 verbose Darwin 16.6.0
12 verbose argv "/usr/local/Cellar/node/8.1.2/bin/node" "/usr/local/bin/npm" "i" "-g" "vue-cli"
13 verbose node v8.1.2
14 verbose npm v5.0.4
15 error Maximum call stack size exceeded
16 verbose exit [ 1, true ]
➜ ~ cnpm i -g vue-cli
Downloading vue-cli to /usr/local/Cellar/node/8.1.2/lib/node_modules/vue-cli_tmp
Copying /usr/local/Cellar/node/8.1.2/lib/node_modules/vue-cli_tmp/[email protected]@vue-cli to /usr/local/Cellar/node/8.1.2/lib/node_modules/vue-cli
Installing vue-cli's dependencies to /usr/local/Cellar/node/8.1.2/lib/node_modules/vue-cli/node_modules
[1/43] commander@^2.9.0 installed at node_modules/[email protected]@commander
[2/43] connect-history-api-fallback@^1.3.0 installed at node_modules/[email protected]@connect-history-api-fallback
[3/43] chalk@^1.1.1 installed at node_modules/[email protected]@chalk
WARN node unsupported "[email protected]" is incompatible with [email protected] › [email protected] › got@^5.0.0, expected node@>=0.10.0 <7
[4/43] consolidate@^0.14.0 installed at node_modules/[email protected]@consolidate
[5/43] express@^4.14.0 installed at node_modules/[email protected]@express
[6/43] file-loader@^0.9.0 installed at node_modules/[email protected]@file-loader
[7/43] friendly-errors-webpack-plugin@^1.1.2 installed at node_modules/[email protected]@friendly-errors-webpack-plugin
[8/43] download-git-repo@^0.2.1 installed at node_modules/[email protected]@download-git-repo
[9/43] extract-text-webpack-plugin@^2.0.0-rc.3 installed at node_modules/[email protected]@extract-text-webpack-plugin
[10/43] handlebars@^4.0.5 installed at node_modules/[email protected]@handlebars
[11/43] autoprefixer@^6.6.1 installed at node_modules/[email protected]@autoprefixer
[12/43] css-loader@^0.26.1 installed at node_modules/[email protected]@css-loader
[13/43] installed-by-yarn-globally@^0.1.1 installed at node_modules/[email protected]@installed-by-yarn-globally
[14/43] minimatch@^3.0.0 existed at node_modules/[email protected]@minimatch
[15/43] multimatch@^2.1.0 installed at node_modules/[email protected]@multimatch
[16/43] opn@^4.0.2 installed at node_modules/[email protected]@opn
[17/43] metalsmith@^2.1.0 installed at node_modules/[email protected]@metalsmith
[18/43] html-webpack-plugin@^2.26.0 installed at node_modules/[email protected]@html-webpack-plugin
[19/43] async@^2.0.0-rc.2 installed at node_modules/[email protected]@async
[20/43] http-proxy-middleware@^0.17.3 installed at node_modules/[email protected]@http-proxy-middleware
[21/43] inquirer@^0.12.0 installed at node_modules/[email protected]@inquirer
[22/43] copy-webpack-plugin@^4.0.1 installed at node_modules/[email protected]@copy-webpack-plugin
[23/43] rimraf@^2.6.1 existed at node_modules/[email protected]@rimraf
[24/43] semver@^5.1.0 existed at node_modules/[email protected]@semver
[25/43] post-compile-webpack-plugin@^0.1.0 installed at node_modules/[email protected]@post-compile-webpack-plugin
[26/43] user-home@^2.0.0 existed at node_modules/[email protected]@user-home
[27/43] tildify@^1.2.0 installed at node_modules/[email protected]@tildify
[28/43] ora@^0.2.1 installed at node_modules/[email protected]@ora
[29/43] url-loader@^0.5.7 installed at node_modules/[email protected]@url-loader
[30/43] validate-npm-package-name@^2.2.2 installed at node_modules/[email protected]@validate-npm-package-name
[31/43] webpack@^2.2.0 existed at node_modules/[email protected]@webpack
[32/43] webpack-dev-middleware@^1.9.0 installed at node_modules/[email protected]@webpack-dev-middleware
[33/43] postcss-loader@^1.2.1 installed at node_modules/[email protected]@postcss-loader
[34/43] vue-template-compiler@^2.1.10 installed at node_modules/[email protected]@vue-template-compiler
[35/43] read-metadata@^1.0.0 installed at node_modules/[email protected]@read-metadata
[36/43] webpack-merge@^2.3.1 installed at node_modules/[email protected]@webpack-merge
[37/43] vue@^2.1.10 installed at node_modules/[email protected]@vue
[38/43] webpack-hot-middleware@^2.15.0 installed at node_modules/[email protected]@webpack-hot-middleware
[39/43] request@^2.67.0 installed at node_modules/[email protected]@request
[40/43] babel-core@^6.21.0 installed at node_modules/[email protected]@babel-core
[41/43] babel-preset-vue-app@^0.4.0 installed at node_modules/[email protected]@babel-preset-vue-app
[42/43] vue-loader@^10.0.2 installed at node_modules/[email protected]@vue-loader
[email protected] download from binary mirror: {"module_name":"fse","module_path":"./lib/binding/{configuration}/{node_abi}-{platform}-{arch}/","remote_path":"./v{version}/","package_name":"{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz","host":"https://npm.taobao.org/mirrors/fsevents"}
[43/43] babel-loader@^6.2.10 installed at node_modules/[email protected]@babel-loader
execute post install 1 scripts...
[1/1] scripts.install [email protected] › [email protected] › [email protected] › [email protected] › fsevents@^1.0.0 run "node install"
[fsevents] Success: "/usr/local/Cellar/node/8.1.2/lib/node_modules/vue-cli/node_modules/[email protected]@fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
[1/1] scripts.install [email protected] › [email protected] › [email protected] › [email protected] › fsevents@^1.0.0 finished in 292ms
peerDependencies link [email protected] in /usr/local/Cellar/node/8.1.2/lib/node_modules/vue-cli/node_modules/[email protected]@ajv-keywords unmet with /usr/local/Cellar/node/8.1.2/lib/node_modules/vue-cli/node_modules/ajv(5.2.2)
Recently updated (since 2017-07-11): 12 packages (detail see file /usr/local/Cellar/node/8.1.2/lib/node_modules/vue-cli/node_modules/.recently_updates.txt)
Today:
→ [email protected] › [email protected] › electron-to-chromium@^1.2.7(1.3.16) (16:02:23)
→ [email protected] › caniuse-db@^1.0.30000634(1.0.30000702) (14:26:53)
2017-07-17
→ [email protected] › [email protected] › postcss@^6.0.1(6.0.7) (23:16:13)
→ [email protected] › [email protected] › coffee-script@^1.12.4(1.12.7) (14:55:16)
2017-07-16
→ [email protected] › [email protected] › [email protected] › [email protected] › [email protected] › [email protected] › color-name@^1.0.0(1.1.3) (06:17:08)
→ [email protected] › [email protected] › [email protected](3.0.25) (12:08:21)
2017-07-15
→ [email protected] › [email protected] › watchpack@^1.3.1(1.4.0) (17:32:29)
2017-07-14
→ [email protected] › [email protected] › [email protected](4.1.7) (20:51:08)
2017-07-13
→ vue-template-compiler@^2.1.10(2.4.1) (14:40:14)
→ vue@^2.1.10(2.4.1) (14:40:52)
2017-07-12
→ [email protected] › webpack@^2.2.0(2.7.0) (15:00:52)
2017-07-11
→ [email protected] › [email protected] › [email protected] › crypto-browserify@^3.11.0(3.11.1) (22:26:00)
All packages installed (792 packages installed from npm registry, used 12s, speed 1.18MB/s, json 732(1.28MB), tarball 13.18MB)
[[email protected]] link /usr/local/Cellar/node/8.1.2/bin/vue@ -> /usr/local/Cellar/node/8.1.2/lib/node_modules/vue-cli/bin/vue
[[email protected]] link /usr/local/Cellar/node/8.1.2/bin/vue-init@ -> /usr/local/Cellar/node/8.1.2/lib/node_modules/vue-cli/bin/vue-init
[[email protected]] link /usr/local/Cellar/node/8.1.2/bin/vue-list@ -> /usr/local/Cellar/node/8.1.2/lib/node_modules/vue-cli/bin/vue-list
[[email protected]] link /usr/local/Cellar/node/8.1.2/bin/vue-build@ -> /usr/local/Cellar/node/8.1.2/lib/node_modules/vue-cli/bin/vue-build
➜ ~ vue
zsh: command not found: vue
is WARN node unsupported "[email protected]" is incompatible with [email protected] › [email protected] › got@^5.0.0, expected node@>=0.10.0 <7 the key??
After I update node to V8.1.4 it works. maybe it is a bug in v8.1.2
install 'vpm', my error was resolved,
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
or
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
`command -v nvm`