我正在从头开始开发React应用,先做npm init
,然后做npm install --save-dev webpack
。我收到“超出最大调用堆栈大小”的错误。
现在,我移动并尝试使用Yarn并发现尝试yarn add -D webpack
并查看调试日志时发现了另一个错误:
113 http提取GET 404 https://registry.npmjs.org/@xtuc%2flong 326ms
@ xtuc / long @ 4.2.1的114愚蠢的fetchPackageMetaData错误404未找到:@ xtuc / long @ 4.2.1
我去了xtuc / long的npm,发现long在4.0.0版本上,而webpack正在寻找4.2.1。
现在我可以归结为两个问题:
这是我的调试日志,如果我遇到任何问题可以帮忙吗?
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files (x86)\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\kodalka\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli '--save-dev',
1 verbose cli 'webpack' ]
2 info using npm@6.4.1
3 info using node@v8.9.1
4 verbose npm-session fa08a0570042b412
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 200 https://registry.npmjs.org/webpack 240ms
8 silly pacote tag manifest for webpack@latest fetched in 277ms
9 timing stage:loadCurrentTree Completed in 573ms
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
13 silly install loadShrinkwrap
14 http fetch GET 200 https://registry.npmjs.org/react 86ms
15 silly pacote version manifest for react@16.6.1 fetched in 95ms
16 http fetch GET 200 https://registry.npmjs.org/react-dom 73ms
17 silly pacote version manifest for react-dom@16.6.1 fetched in 82ms
18 timing stage:loadIdealTree:loadShrinkwrap Completed in 191ms
19 silly install loadAllDepsIntoIdealTree
20 silly resolveWithNewModule webpack@4.25.1 checking installable status
21 http fetch GET 200 https://registry.npmjs.org/acorn-dynamic-import 75ms
22 http fetch GET 200 https://registry.npmjs.org/chrome-trace-event 86ms
23 silly pacote range manifest for chrome-trace-event@^1.0.0 fetched in 124ms
24 silly resolveWithNewModule chrome-trace-event@1.0.0 checking installable status
25 http fetch GET 200 https://registry.npmjs.org/acorn 130ms
26 http fetch GET 200 https://registry.npmjs.org/ajv-keywords 133ms
27 http fetch GET 200 https://registry.npmjs.org/@webassemblyjs%2fhelper-module-context 136ms
28 http fetch GET 200 https://registry.npmjs.org/@webassemblyjs%2fwasm-edit 172ms
29 http fetch GET 200 https://registry.npmjs.org/@webassemblyjs%2fwasm-parser 173ms
30 http fetch GET 200 https://registry.npmjs.org/@webassemblyjs%2fast 176ms
31 http fetch GET 200 https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz 98ms
32 http fetch GET 200 https://registry.npmjs.org/ajv 190ms
33 silly pacote range manifest for ajv-keywords@^3.1.0 fetched in 193ms
34 silly resolveWithNewModule ajv-keywords@3.2.0 checking installable status
35 silly pacote range manifest for acorn@^5.6.2 fetched in 196ms
36 silly resolveWithNewModule acorn@5.7.3 checking installable status
37 silly pacote range manifest for acorn-dynamic-import@^3.0.0 fetched in 196ms
38 silly resolveWithNewModule acorn-dynamic-import@3.0.0 checking installable status
39 http fetch GET 200 https://registry.npmjs.org/eslint-scope 70ms
40 silly pacote version manifest for @webassemblyjs/helper-module-context@1.7.11 fetched in 200ms
41 silly resolveWithNewModule @webassemblyjs/helper-module-context@1.7.11 checking installable status
42 silly pacote version manifest for @webassemblyjs/wasm-edit@1.7.11 fetched in 201ms
43 silly resolveWithNewModule @webassemblyjs/wasm-edit@1.7.11 checking installable status
44 silly pacote version manifest for @webassemblyjs/wasm-parser@1.7.11 fetched in 203ms
45 silly resolveWithNewModule @webassemblyjs/wasm-parser@1.7.11 checking installable status
46 silly pacote version manifest for @webassemblyjs/ast@1.7.11 fetched in 208ms
47 silly resolveWithNewModule @webassemblyjs/ast@1.7.11 checking installable status
48 silly pacote range manifest for ajv@^6.1.0 fetched in 210ms
49 silly resolveWithNewModule ajv@6.5.5 checking installable status
50 silly pacote range manifest for eslint-scope@^4.0.0 fetched in 89ms
51 silly resolveWithNewModule eslint-scope@4.0.0 checking installable status
52 http fetch GET 200 https://registry.npmjs.org/mkdirp 40ms
53 http fetch GET 200 https://registry.npmjs.org/json-parse-better-errors 51ms
54 http fetch GET 200 https://registry.npmjs.org/loader-utils 54ms
55 http fetch GET 200 https://registry.npmjs.org/loader-runner 58ms
56 http fetch GET 200 https://registry.npmjs.org/neo-async 49ms
57 silly pacote range manifest for json-parse-better-errors@^1.0.2 fetched in 80ms
58 silly resolveWithNewModule json-parse-better-errors@1.0.2 checking installable status
59 silly pacote range manifest for loader-utils@^1.1.0 fetched in 87ms
60 silly resolveWithNewModule loader-utils@1.1.0 checking installable status
61 http fetch GET 200 https://registry.npmjs.org/schema-utils 70ms
62 http fetch GET 200 https://registry.npmjs.org/memory-fs 87ms
63 silly pacote range manifest for neo-async@^2.5.0 fetched in 81ms
64 silly resolveWithNewModule neo-async@2.6.0 checking installable status
65 silly pacote range manifest for loader-runner@^2.3.0 fetched in 91ms
66 silly resolveWithNewModule loader-runner@2.3.1 checking installable status
67 http fetch GET 200 https://registry.npmjs.org/micromatch 95ms
68 http fetch GET 200 https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz 53ms
69 http fetch GET 200 https://registry.npmjs.org/node-libs-browser 86ms
70 silly pacote range manifest for schema-utils@^0.4.4 fetched in 92ms
71 silly resolveWithNewModule schema-utils@0.4.7 checking installable status
72 silly pacote range manifest for memory-fs@~0.4.1 fetched in 109ms
73 silly resolveWithNewModule memory-fs@0.4.1 checking installable status
74 silly pacote range manifest for micromatch@^3.1.8 fetched in 112ms
75 silly resolveWithNewModule micromatch@3.1.10 checking installable status
76 silly pacote range manifest for mkdirp@~0.5.0 fetched in 110ms
77 silly resolveWithNewModule mkdirp@0.5.1 checking installable status
78 silly pacote range manifest for node-libs-browser@^2.0.0 fetched in 104ms
79 silly resolveWithNewModule node-libs-browser@2.1.0 checking installable status
80 http fetch GET 200 https://registry.npmjs.org/tapable 42ms
81 http fetch GET 200 https://registry.npmjs.org/enhanced-resolve 319ms
82 silly pacote range manifest for tapable@^1.1.0 fetched in 50ms
83 silly resolveWithNewModule tapable@1.1.0 checking installable status
84 silly pacote range manifest for enhanced-resolve@^4.1.0 fetched in 328ms
85 silly resolveWithNewModule enhanced-resolve@4.1.0 checking installable status
86 http fetch GET 200 https://registry.npmjs.org/webpack-sources 51ms
87 silly pacote range manifest for webpack-sources@^1.3.0 fetched in 57ms
88 silly resolveWithNewModule webpack-sources@1.3.0 checking installable status
89 http fetch GET 200 https://registry.npmjs.org/watchpack 72ms
90 silly pacote range manifest for watchpack@^1.5.0 fetched in 85ms
91 silly resolveWithNewModule watchpack@1.6.0 checking installable status
92 http fetch GET 200 https://registry.npmjs.org/uglifyjs-webpack-plugin 92ms
93 silly pacote range manifest for uglifyjs-webpack-plugin@^1.2.4 fetched in 101ms
94 silly resolveWithNewModule uglifyjs-webpack-plugin@1.3.0 checking installable status
95 http fetch GET 200 https://registry.npmjs.org/@webassemblyjs%2fhelper-wasm-bytecode 44ms
96 http fetch GET 200 https://registry.npmjs.org/@webassemblyjs%2fwast-parser 48ms
97 silly pacote version manifest for @webassemblyjs/helper-wasm-bytecode@1.7.11 fetched in 52ms
98 silly resolveWithNewModule @webassemblyjs/helper-wasm-bytecode@1.7.11 checking installable status
99 silly pacote version manifest for @webassemblyjs/wast-parser@1.7.11 fetched in 55ms
100 silly resolveWithNewModule @webassemblyjs/wast-parser@1.7.11 checking installable status
101 http fetch GET 200 https://registry.npmjs.org/@webassemblyjs%2fhelper-api-error 35ms
102 silly pacote version manifest for @webassemblyjs/helper-api-error@1.7.11 fetched in 48ms
103 silly resolveWithNewModule @webassemblyjs/helper-api-error@1.7.11 checking installable status
104 http fetch GET 200 https://registry.npmjs.org/@webassemblyjs%2fhelper-fsm 50ms
105 http fetch GET 200 https://registry.npmjs.org/@webassemblyjs%2ffloating-point-hex-parser 54ms
106 silly pacote version manifest for @webassemblyjs/helper-fsm@1.7.11 fetched in 58ms
107 silly resolveWithNewModule @webassemblyjs/helper-fsm@1.7.11 checking installable status
108 silly pacote version manifest for @webassemblyjs/floating-point-hex-parser@1.7.11 fetched in 65ms
109 silly resolveWithNewModule @webassemblyjs/floating-point-hex-parser@1.7.11 checking installable status
110 http fetch GET 200 https://registry.npmjs.org/@webassemblyjs%2fhelper-code-frame 72ms
111 silly pacote version manifest for @webassemblyjs/helper-code-frame@1.7.11 fetched in 79ms
112 silly resolveWithNewModule @webassemblyjs/helper-code-frame@1.7.11 checking installable status
113 http fetch GET 404 https://registry.npmjs.org/@xtuc%2flong 326ms
114 silly fetchPackageMetaData error for @xtuc/long@4.2.1 404 Not Found: @xtuc/long@4.2.1
115 verbose stack RangeError: Maximum call stack size exceeded
115 verbose stack at RegExp.test (<anonymous>)
115 verbose stack at isDepOptional (C:\Users\kodalka\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:405:45)
115 verbose stack at failedDependency (C:\Users\kodalka\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:414:9)
115 verbose stack at failedDependency (C:\Users\kodalka\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
115 verbose stack at failedDependency (C:\Users\kodalka\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
115 verbose stack at failedDependency (C:\Users\kodalka\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
115 verbose stack at failedDependency (C:\Users\kodalka\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
115 verbose stack at failedDependency (C:\Users\kodalka\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
115 verbose stack at failedDependency (C:\Users\kodalka\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
115 verbose stack at failedDependency (C:\Users\kodalka\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
115 verbose stack at failedDependency (C:\Users\kodalka\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
115 verbose stack at failedDependency (C:\Users\kodalka\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
115 verbose stack at failedDependency (C:\Users\kodalka\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
115 verbose stack at failedDependency (C:\Users\kodalka\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
115 verbose stack at failedDependency (C:\Users\kodalka\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
115 verbose stack at failedDependency (C:\Users\kodalka\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
116 verbose cwd C:\Git Code\react-project
117 verbose Windows_NT 6.1.7601
118 verbose argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\kodalka\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save-dev" "webpack"
119 verbose node v8.9.1
120 verbose npm v6.4.1
121 error Maximum call stack size exceeded
122 verbose exit [ 1, true ]