next.js 下一个js ESM必需问题

t5zmwmid  于 2023-02-08  发布在  其他
关注(0)|答案(1)|浏览(333)

info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules info - Linting and checking validity of types info - Creating an optimized production build
info - Compiled successfully info - Collecting page data .Error [ERR_REQUIRE_ESM]: require() of ES Module D:\bongodeshi\frontend\node_modules@antv\g-base\node_modules\d3-interpolate\src\index.js from D:\bongodeshi\frontend\node_modules@antv\g-base\lib\animate\timeline.js not supported. Instead change the require of index.js in D:\bongodeshi\frontend\node_modules@antv\g-base\lib\animate\timeline.js to a dynamic import() which is available in all CommonJS modules. at Object. (D:\bongodeshi\frontend\node_modules@antv\g-base\lib\animate\timeline.js:5:24) at Object. (D:\bongodeshi\frontend\node_modules@antv\g-base\lib\abstract\canvas.js:7:18) at Object. (D:\bongodeshi\frontend\node_modules@antv\g-base\lib\index.js:17:16) at Object. (D:\bongodeshi\frontend\node_modules@antv\g2\lib\dependents.js:6:16) at Object. (D:\bongodeshi\frontend\node_modules@antv\g2\lib\util\scale.js:7:20) at Object. (D:\bongodeshi\frontend\node_modules@antv\g2\lib\util\axis.js:6:15) at Object. (D:\bongodeshi\frontend\node_modules@antv\g2\lib\facet\facet.js:7:14) at Object. (D:\bongodeshi\frontend\node_modules@antv\g2\lib\facet\index.js:5:15) at Object. (D:\bongodeshi\frontend\node_modules@antv\g2\lib\chart\view.js:8:15) at Object. (D:\bongodeshi\frontend\node_modules@antv\g2\lib\chart\chart.js:8:38) at Object. (D:\bongodeshi\frontend\node_modules@antv\g2\lib\chart\index.js:7:15) at Object. (D:\bongodeshi\frontend\node_modules@antv\g2\lib\core.js:10:15) at Object. (D:\bongodeshi\frontend\node_modules@antv\g2\lib\index.js:6:14) at Object. (D:\bongodeshi\frontend\node_modules@antv\g2plot\lib\index.js:7:31) at Object. (D:\bongodeshi\frontend\node_modules@ant-design\plots\lib\components\area\index.js:41:16) at Object. (D:\bongodeshi\frontend\node_modules@ant-design\plots\lib\index.js:21:30) at Object. (D:\bongodeshi\frontend\node_modules@ant-design\charts\lib\index.js:18:14) at 3872 (D:\bongodeshi\frontend.next\server\pages\yourOrders.js:42:32) at webpack_require (D:\bongodeshi\frontend.next\server\webpack-runtime.js:25:42) at webpack_exec (D:\bongodeshi\frontend.next\server\pages\yourOrders.js:2069:39) at D:\bongodeshi\frontend.next\server\pages\yourOrders.js:2070:77 at webpack_require.X (D:\bongodeshi\frontend.next\server\webpack-runtime.js:108:21) at D:\bongodeshi\frontend.next\server\pages\yourOrders.js:2070:47 at Object. (D:\bongodeshi\frontend.next\server\pages\yourOrders.js:2073:3) at Object.requirePage (D:\bongodeshi\frontend\node_modules\next\dist\server\require.js:88:12) at D:\bongodeshi\frontend\node_modules\next\dist\server\load-components.js:37:73 at async Object.loadComponents (D:\bongodeshi\frontend\node_modules\next\dist\server\load-components.js:37:26) at async D:\bongodeshi\frontend\node_modules\next\dist\build\utils.js:832:32 at async Span.traceAsyncFn (D:\bongodeshi\frontend\node_modules\next\dist\trace\trace.js:79:20) { code: 'ERR_REQUIRE_ESM' }
Build error occurred Error: Failed to collect page data for /yourOrders at D:\bongodeshi\frontend\node_modules\next\dist\build\utils.js:949:15 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { type: 'Error' } info - Collecting page data .
'npm run build' command not working.

5sxhfpxr

5sxhfpxr1#

我找到了解决办法。现在我从我的项目中删除了图表包。

相关问题