javascript - 运行下一个构建时出错
问题描述
当我运行 npm next build 时,我收到此错误。我试过用谷歌搜索,但找不到解决方案,我还尝试安装“extract-text-webpack-plugin”
那不解决问题。。
这是它抛出的错误:
> 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)
真的很感谢解答!
解决方案
这个插件需要更新。更新一切顺利后我遇到了同样的问题:)
npm install extract-text-webpack-plugin@next
yarn add extract-text-webpack-plugin@next
推荐阅读
- c++ - 不期望向量的 C++ 输出元素
- sql - Excel VBA sql查询为一列返回错误值(将值增加1)
- keras - 通过单个 RNN LSTM 单元的 for 循环和在 Keras 中返回序列的 RNN 之间有什么区别?
- delphi - 如何在运行时从任务栏中隐藏我的任务栏图标?
- amazon-s3 - Pharma 客户端不允许我们通过 Internet 路径将敏感数据移动到安全的 s3 存储桶
- xcode - xCode Simulator 失败(有不同的错误集)-CoreLocation / MapView 测试
- azure - 使用内置触发器或事件网格的 Azure 函数
- flutter - flutter :从外部存储目录中删除文件
- python - python:使用正则表达式获取情节
- asp.net - 413 请求实体太大 - 文件上传 ASP.NET MVC