2017-08-07 81 views
1

我遇到了一個小問題,我的陣營測試腳本和我結束了我的升級與故宮以下命令的WebPack不能建立

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) 

找不到對谷歌的任何解決方案... 如果有人能指引我正確的方向,這將是偉大的...

回答

0

什麼版本的webpack你使用之前upg把它呢? webpack 1和2/3之間有明顯的配置差​​異。

我建議現在將webpack回滾到以前的版本。找出如何遷移你的webpack配置文件,然後遷移。

+1

感謝您的回覆。結束更新少量軟件包並添加一個軟件包以使其正常工作。所以現在我有webpack(3.5.1),npm(5.3.0),extract-text-webpack-plugin(3.0.0)和艱難cokie ........仍然搞清楚爲什麼mocha/jsdom測試腳本不工作..... –