我的 React 测试脚本有一个小问题,我最终使用以下命令升级了我的 npm
npm upgrade -g
我认为这不仅升级npm
(到 5.3.0)而且webpack
(到 3.4.1)、extract-text-webpack-plugin
(到 3.0.0)和每个npm
包。
理想情况下,这应该已经解决了所有问题,但是我在使用webpack
构建代码时遇到了以下错误:
C:\Users\xxx\Google Drive\sites\trip\jsbuild>webpack -d --display-error-details
C:\Users\xxx\AppData\Roaming\npm\node_modules\webpack\lib\Chunk.js:49
throw new Error("Chunk.entry was removed. Use hasRuntime()");
^
Error: Chunk.entry was removed. Use hasRuntime()
at Chunk.entry (C:\Users\xxx\AppData\Roaming\npm\node_modules\webpack\lib\Chunk.js:49:9)
at C:\Users\xxx\AppData\Roaming\npm\node_modules\extract-text-webpack-plugin\index.js:201:13
at Array.filter (native)
at Compilation.<anonymous> (C:\Users\xxx\AppData\Roaming\npm\node_modules\extract-text-webpack-plugin\index.js:200:37)
at Compilation.applyPlugins0 (C:\Users\xxx\AppData\Roaming\npm\node_modules\webpack\node_modules\tapable\lib\Tapable.js:68:14)
at Compilation.seal (C:\Users\xxx\AppData\Roaming\npm\node_modules\webpack\lib\Compilation.js:567:8)
at C:\Users\xxx\AppData\Roaming\npm\node_modules\webpack\lib\Compiler.js:514:17
at C:\Users\xxx\AppData\Roaming\npm\node_modules\webpack\node_modules\tapable\lib\Tapable.js:289:11
at C:\Users\xxx\AppData\Roaming\npm\node_modules\webpack\lib\Compilation.js:481:11
at C:\Users\xxx\AppData\Roaming\npm\node_modules\webpack\lib\Compilation.js:452:13
at nextTickCallbackWith0Args (node.js:420:9)
at process._tickCallback (node.js:349:13)
在谷歌上找不到任何解决方案......如果有人能指出我正确的方向会很棒......