Reputation: 85
While doing npm i -D webpack
I am getting the following error.
npm ERR! Maximum call stack size exceeded
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/shobhuiy1/.npm/_logs/2019-02-05T10_31_29_468Z-debug.log
Using MacOs. node v10.15.1, npm v6.4.1
I tried doing npm cache clean --force
, it doesn't help.
Attaching the log below.
> 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 'i', 1 verbose cli '-D', 1 verbose cli 'webpack' ] 2 info
> using [email protected] 3 info using [email protected] 4 verbose npm-session
> 8116f23fee5883fe 5 silly install loadCurrentTree 6 silly install
> readLocalPackageData 7 http fetch GET 304
> https://registry.npmjs.org/webpack 266ms (from cache) 8 silly pacote
> tag manifest for webpack@latest fetched in 295ms 9 timing
> stage:loadCurrentTree Completed in 530ms 10 silly install
> loadIdealTree 11 silly install cloneCurrentTreeToIdealTree 12 timing
> stage:loadIdealTree:cloneCurrentTree Completed in 0ms 13 silly install
> loadShrinkwrap 14 timing stage:loadIdealTree:loadShrinkwrap Completed
> in 1ms 15 silly install loadAllDepsIntoIdealTree 16 silly
> resolveWithNewModule [email protected] checking installable status 17
> http fetch GET 304 https://registry.npmjs.org/@webassemblyjs%2fast
> 78ms (from cache) 18 silly pacote version manifest for
> @webassemblyjs/[email protected] fetched in 81ms 19 silly
> resolveWithNewModule @webassemblyjs/[email protected] checking installable
> status 20 http fetch GET 304
> https://registry.npmjs.org/chrome-trace-event 114ms (from cache) 21
> http fetch GET 304 https://registry.npmjs.org/acorn 118ms (from cache)
> 22 silly pacote range manifest for chrome-trace-event@^1.0.0 fetched
> in 116ms 23 silly resolveWithNewModule [email protected]
> checking installable status 24 silly pacote range manifest for
> acorn@^6.0.5 fetched in 122ms 25 silly resolveWithNewModule
> [email protected] checking installable status 26 http fetch GET 304
> https://registry.npmjs.org/eslint-scope 52ms (from cache) 27 silly
> pacote range manifest for eslint-scope@^4.0.0 fetched in 53ms 28 silly
> resolveWithNewModule [email protected] checking installable status 29
> http fetch GET 304 https://registry.npmjs.org/ajv-keywords 145ms (from
> cache) 30 silly pacote range manifest for ajv-keywords@^3.1.0 fetched
> in 148ms 31 silly resolveWithNewModule [email protected] checking
> installable status 32 http fetch GET 304
> https://registry.npmjs.org/@webassemblyjs%2fhelper-module-context
> 158ms (from cache) 33 silly pacote version manifest for
> @webassemblyjs/[email protected] fetched in 162ms 34 silly
> resolveWithNewModule @webassemblyjs/[email protected]
> checking installable status 35 http fetch GET 304
> https://registry.npmjs.org/@webassemblyjs%2fwasm-edit 165ms (from
> cache) 36 silly pacote version manifest for
> @webassemblyjs/[email protected] fetched in 172ms 37 silly
> resolveWithNewModule @webassemblyjs/[email protected] checking
> installable status 38 http fetch GET 304
> https://registry.npmjs.org/json-parse-better-errors 54ms (from cache)
> 39 silly pacote range manifest for json-parse-better-errors@^1.0.2
> fetched in 60ms 40 silly resolveWithNewModule
> [email protected] checking installable status 41 http
> fetch GET 304 https://registry.npmjs.org/ajv 184ms (from cache) 42
> http fetch GET 304 https://registry.npmjs.org/loader-runner 70ms (from
> cache) 43 http fetch GET 304
> https://registry.npmjs.org/enhanced-resolve 190ms (from cache) 44
> silly pacote range manifest for ajv@^6.1.0 fetched in 195ms 45 silly
> resolveWithNewModule [email protected] checking installable status 46 silly
> pacote range manifest for loader-runner@^2.3.0 fetched in 78ms 47
> silly resolveWithNewModule [email protected] checking installable
> status 48 silly pacote range manifest for enhanced-resolve@^4.1.0
> fetched in 198ms 49 silly resolveWithNewModule [email protected]
> checking installable status 50 http fetch GET 304
> https://registry.npmjs.org/acorn-dynamic-import 212ms (from cache) 51
> http fetch GET 304
> https://registry.npmjs.org/@webassemblyjs%2fwasm-parser 216ms (from
> cache) 52 http fetch GET 304 https://registry.npmjs.org/loader-utils
> 83ms (from cache) 53 silly pacote range manifest for
> acorn-dynamic-import@^4.0.0 fetched in 216ms 54 silly
> resolveWithNewModule [email protected] checking installable
> status 55 silly pacote version manifest for
> @webassemblyjs/[email protected] fetched in 220ms 56 silly
> resolveWithNewModule @webassemblyjs/[email protected] checking
> installable status 57 silly pacote range manifest for
> loader-utils@^1.1.0 fetched in 87ms 58 silly resolveWithNewModule
> [email protected] checking installable status 59 http fetch GET 304
> https://registry.npmjs.org/memory-fs 77ms (from cache) 60 http fetch
> GET 304 https://registry.npmjs.org/micromatch 71ms (from cache) 61
> silly pacote range manifest for memory-fs@~0.4.1 fetched in 80ms 62
> silly resolveWithNewModule [email protected] checking installable status
> 63 silly pacote range manifest for micromatch@^3.1.8 fetched in 78ms
> 64 silly resolveWithNewModule [email protected] checking installable
> status 65 http fetch GET 304 https://registry.npmjs.org/mkdirp 70ms
> (from cache) 66 http fetch GET 304
> https://registry.npmjs.org/neo-async 62ms (from cache) 67 silly pacote
> range manifest for mkdirp@~0.5.0 fetched in 75ms 68 silly
> resolveWithNewModule [email protected] checking installable status 69 silly
> pacote range manifest for neo-async@^2.5.0 fetched in 65ms 70 silly
> resolveWithNewModule [email protected] checking installable status 71
> http fetch GET 304 https://registry.npmjs.org/node-libs-browser 49ms
> (from cache) 72 silly pacote range manifest for
> node-libs-browser@^2.0.0 fetched in 50ms 73 silly resolveWithNewModule
> [email protected] checking installable status 74 http fetch GET
> 304 https://registry.npmjs.org/tapable 56ms (from cache) 75 http fetch
> GET 304 https://registry.npmjs.org/terser-webpack-plugin 44ms (from
> cache) 76 silly pacote range manifest for tapable@^1.1.0 fetched in
> 59ms 77 silly resolveWithNewModule [email protected] checking installable
> status 78 silly pacote range manifest for terser-webpack-plugin@^1.1.0
> fetched in 46ms 79 silly resolveWithNewModule
> [email protected] checking installable status 80 http fetch
> GET 304 https://registry.npmjs.org/schema-utils 64ms (from cache) 81
> silly pacote range manifest for schema-utils@^0.4.4 fetched in 65ms 82
> silly resolveWithNewModule [email protected] checking installable
> status 83 http fetch GET 304
> https://registry.npmjs.org/webpack-sources 58ms (from cache) 84 silly
> pacote range manifest for webpack-sources@^1.3.0 fetched in 59ms 85
> silly resolveWithNewModule [email protected] checking installable
> status 86 http fetch GET 304 https://registry.npmjs.org/watchpack 60ms
> (from cache) 87 silly pacote range manifest for watchpack@^1.5.0
> fetched in 61ms 88 silly resolveWithNewModule [email protected] checking
> installable status 89 http fetch GET 304
> https://registry.npmjs.org/@webassemblyjs%2fwast-parser 50ms (from
> cache) 90 silly pacote version manifest for
> @webassemblyjs/[email protected] fetched in 53ms 91 silly
> resolveWithNewModule @webassemblyjs/[email protected] checking
> installable status 92 http fetch GET 304
> https://registry.npmjs.org/@webassemblyjs%2fhelper-wasm-bytecode 57ms
> (from cache) 93 silly pacote version manifest for
> @webassemblyjs/[email protected] fetched in 59ms 94 silly
> resolveWithNewModule @webassemblyjs/[email protected]
> checking installable status 95 http fetch GET 304
> https://registry.npmjs.org/@webassemblyjs%2fhelper-api-error 58ms
> (from cache) 96 http fetch GET 304
> https://registry.npmjs.org/@webassemblyjs%2fhelper-fsm 58ms (from
> cache) 97 http fetch GET 304
> https://registry.npmjs.org/@webassemblyjs%2fhelper-code-frame 60ms
> (from cache) 98 silly pacote version manifest for
> @webassemblyjs/[email protected] fetched in 62ms 99 silly
> resolveWithNewModule @webassemblyjs/[email protected] checking
> installable status 100 silly pacote version manifest for
> @webassemblyjs/[email protected] fetched in 62ms 101 silly
> resolveWithNewModule @webassemblyjs/[email protected] checking
> installable status 102 silly pacote version manifest for
> @webassemblyjs/[email protected] fetched in 63ms 103 silly
> resolveWithNewModule @webassemblyjs/[email protected] checking
> installable status 104 http fetch GET 304
> https://registry.npmjs.org/@webassemblyjs%2ffloating-point-hex-parser
> 65ms (from cache) 105 silly pacote version manifest for
> @webassemblyjs/[email protected] fetched in 66ms 106
> silly resolveWithNewModule
> @webassemblyjs/[email protected] checking installable
> status 107 http fetch GET 404 https://registry.npmjs.org/@xtuc%2flong
> 474ms 108 silly fetchPackageMetaData error for @xtuc/[email protected] 404
> Not Found: @xtuc/[email protected] 109 verbose stack RangeError: Maximum call
> stack size exceeded 109 verbose stack at RegExp.test (<anonymous>)
> 109 verbose stack at isDepOptional
> (/usr/local/lib/node_modules/npm/lib/install/deps.js:405:45) 109
> verbose stack at failedDependency
> (/usr/local/lib/node_modules/npm/lib/install/deps.js:414:9) 109
> verbose stack at failedDependency
> (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9) 109
> verbose stack at failedDependency
> (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9) 109
> verbose stack at failedDependency
> (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9) 109
> verbose stack at failedDependency
> (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9) 109
> verbose stack at failedDependency
> (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9) 109
> verbose stack at failedDependency
> (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9) 109
> verbose stack at failedDependency
> (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9) 109
> verbose stack at failedDependency
> (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9) 109
> verbose stack at failedDependency
> (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9) 109
> verbose stack at failedDependency
> (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9) 109
> verbose stack at failedDependency
> (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9) 109
> verbose stack at failedDependency
> (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9) 109
> verbose stack at failedDependency
> (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9) 110
> verbose cwd
> /Users/shobhuiy1/Documents/shouvik-personal/softwares-dev/spliwise-react-redux
> 111 verbose Darwin 17.7.0 112 verbose argv "/usr/local/bin/node"
> "/usr/local/bin/npm" "i" "-D" "webpack" 113 verbose node v10.15.1 114
> verbose npm v6.4.1 115 error Maximum call stack size exceeded 116
> verbose exit [ 1, true ]
Upvotes: 1
Views: 13160
Reputation: 3991
First, remove node_modules folder.
Then,
npm cache clean --f
Finally, reinstall dependencies
npm i
Upvotes: 0
Reputation: 85
Looks like the npm configurations were somehow modified / corrupted.
I uninstalled node and npm from my machine and reinstalled node, worked for me.
Steps to uninstall node with brew.
brew uninstall node
brew cleanup
Steps to uninstall node manually, without brew.
delete node and npm from /usr/local/bin
Upvotes: 1