当我运行npm下一个版本时,出现此错误。 我试图用Google搜索它,但找不到解决方案,我也尝试安装 “提取文本Webpack插件”
那不能解决问题。
这是它抛出的错误:
> next build
(node:8136) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
[11:17:18] Compiling client
[11:17:18] Compiling server
(node:8136) UnhandledPromiseRejectionWarning: Error: Chunk.entrypoints: Use Chunks.groupsIterable and filter by instanceof Entrypoint instead
at Chunk.get (C:\Users\char\Documents\GitHub\Si.Client\node_modules\webpack\lib\Chunk.js:824:9)
at C:\Users\char\Documents\GitHub\Si.Client\node_modules\@zeit\next-css\node_modules\extract-text-webpack-plugin\dist\index.js:176:48
at Array.forEach (<anonymous>)
at C:\Users\char\Documents\GitHub\Si.Client\node_modules\@zeit\next-css\node_modules\extract-text-webpack-plugin\dist\index.js:171:18
at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Users\char\Documents\GitHub\Si.Client\node_modules\tapable\lib\HookCodeFactory.js:24:12), <anonymous>:12:1)
at AsyncSeriesHook.lazyCompileHook [as _callAsync] (C:\Users\char\Documents\GitHub\Si.Client\node_modules\tapable\lib\Hook.js:35:21)
at Compilation.seal (C:\Users\char\Documents\GitHub\Si.Client\node_modules\webpack\lib\Compilation.js:1203:27)
at hooks.make.callAsync.err (C:\Users\char\Documents\GitHub\Si.Client\node_modules\webpack\lib\Compiler.js:547:17)
at _err0 (eval at create (C:\Users\char\Documents\GitHub\Si.Client\node_modules\tapable\lib\HookCodeFactory.js:24:12), <anonymous>:11:1)
at Promise.all.then (C:\Users\char\Documents\GitHub\Si.Client\node_modules\webpack\lib\DynamicEntryPlugin.js:73:20)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
(node:8136) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with
.catch(). (rejection id: 1)
(node:8136) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:8136) UnhandledPromiseRejectionWarning: Error: Chunk.entrypoints: Use Chunks.groupsIterable and filter by instanceof Entrypoint instead
at Chunk.get (C:\Users\char\Documents\GitHub\Si.Client\node_modules\webpack\lib\Chunk.js:824:9)
at C:\Users\char\Documents\GitHub\Si.Client\node_modules\@zeit\next-css\node_modules\extract-text-webpack-plugin\dist\index.js:176:48
at Array.forEach (<anonymous>)
at C:\Users\char\Documents\GitHub\Si.Client\node_modules\@zeit\next-css\node_modules\extract-text-webpack-plugin\dist\index.js:171:18
at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Users\char\Documents\GitHub\Si.Client\node_modules\tapable\lib\HookCodeFactory.js:24:12), <anonymous>:12:1)
at AsyncSeriesHook.lazyCompileHook [as _callAsync] (C:\Users\char\Documents\GitHub\Si.Client\node_modules\tapable\lib\Hook.js:35:21)
at Compilation.seal (C:\Users\char\Documents\GitHub\Si.Client\node_modules\webpack\lib\Compilation.js:1203:27)
at hooks.make.callAsync.err (C:\Users\char\Documents\GitHub\Si.Client\node_modules\webpack\lib\Compiler.js:547:17)
at _err0 (eval at create (C:\Users\char\Documents\GitHub\Si.Client\node_modules\tapable\lib\HookCodeFactory.js:24:12), <anonymous>:11:1)
at Promise.all.then (C:\Users\char\Documents\GitHub\Si.Client\node_modules\webpack\lib\DynamicEntryPlugin.js:73:20)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
(node:8136) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with
.catch(). (rejection id: 2)
非常感谢您的回答!
答案 0 :(得分:0)
此插件需要更新。更新一切后,我遇到了同样的问题:)
npm install extract-text-webpack-plugin@next
yarn add extract-text-webpack-plugin@next