我已经构建了一个简单的react应用程序,并准备投入生产以应对这一挑战。这些错误不断弹出,我无法弄清楚这是怎么回事。
npm run build:prod
这些错误消息不断出现
> webpack -p --env production
(node:15232) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead C:\Users\PM\Desktop\projects\reactApp\node_modules\webpack\lib\Chunk.js:827
throw new Error(
^Error: Chunk.entrypoints: Use Chunks.groupsIterable and filter by instanceof Entrypoint instead
at Chunk.get (C:\Users\PM\Desktop\projects\reactApp\node_modules\webpack\lib\Chunk.js:827:9)
at C:\Users\PM\Desktop\projects\reactApp\node_modules\extract-text-webpack-plugin\dist\index.js:176:48
at Array.forEach (<anonymous>)
at C:\Users\PM\Desktop\projects\reactApp\node_modules\extract-text-webpack-plugin\dist\index.js:171:18
at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Users\PM\Desktop\projects\reactApp\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:7:1)
at AsyncSeriesHook.lazyCompileHook (C:\Users\PM\Desktop\projects\reactApp\node_modules\tapable\lib\Hook.js:154:20)
at Compilation.seal (C:\Users\PM\Desktop\projects\reactApp\node_modules\webpack\lib\Compilation.js:1215:27)
at hooks.make.callAsync.err (C:\Users\PM\Desktop\projects\reactApp\node_modules\webpack\lib\Compiler.js:541:17)
at _err0 (eval at create (C:\Users\PM\Desktop\projects\reactApp\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:11:1)
at _addModuleChain (C:\Users\PM\Desktop\projects\reactApp\node_modules\webpack\lib\Compilation.js:1066:12)
at processModuleDependencies.err (C:\Users\PM\Desktop\projects\reactApp\node_modules\webpack\lib\Compilation.js:982:9)
at process._tickCallback (internal/process/next_tick.js:61:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! reactapp@1.0.0 build:prod: `webpack -p --env production `
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the reactapp@1.0.0 build:prod script.
npm ERR! This is probably not a problem with npm. There is likely
additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\PM\AppData\Roaming\npm-cache\_logs\2018-11-
20T17_04_56_717Z-debug.log
感谢您的帮助。谢谢