You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i run the command "npm run compile" ,it has some error like :
info Collecting page data .deleteTmpSessionChart
info Collecting page data ...Error [ERR_REQUIRE_ESM]: require() of ES Module E:\IdeaWorkspace\AIGC\db-gpt-web\node_modules@antv\g-lite\node_modules\d3-color\src\index.js from E:\IdeaWorkspace\AIGC\db-gpt-web\node_modules@antv\g-lite\dist\index.js not supported.
Instead change the require of E:\IdeaWorkspace\AIGC\db-gpt-web\node_modules@antv\g-lite\node_modules\d3-color\src\index.js in E:\IdeaWorkspace\AIGC\db-gpt-web\node_modules@antv\g-lite\dist\index.js to a dynamic import() which is available in all CommonJS modules.
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at Object. (E:\IdeaWorkspace\AIGC\db-gpt-web\node_modules@antv\g-lite\dist\index.js:7:10) {
code: 'ERR_REQUIRE_ESM'
}
Build error occurred
Error: Failed to collect page data for /knowledge/graph
at E:\IdeaWorkspace\AIGC\db-gpt-web\node_modules\next\dist\build\utils.js:1161:15
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
type: 'Error'
NodeJs -> V 22.4.1
Npm -> V10.8.1
The text was updated successfully, but these errors were encountered:
info Collecting page data ..Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Users\gaogao\Desktop\DB-GPT\web\node_modules\d3-color\src\index.js from C:\Users\gaogao\Desktop\DB-GPT\web\node_modules@antv\g-lite\dist\index.js not supported.Instead change the require of C:\Users\gaogao\Desktop\DB-GPT\web\node_modules\d3-color\src\index.js in C:\Users\gaogao\Desktop\DB-GPT\web\node_modules@antv\g-lite\dist\index.js to a dynamic import() which is available in all CommonJS modules.
at Object. (C:\Users\gaogao\Desktop\DB-GPT\web\node_modules@antv\g-lite\dist\index.js:24:10) {
code: 'ERR_REQUIRE_ESM'
}
Build error occurred
Error: Failed to collect page data for /knowledge/graph
at C:\Users\gaogao\Desktop\DB-GPT\web\node_modules\next\dist\build\utils.js:1161:15
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
type: 'Error'
}
info Collecting page data .Note: This command was run via npm module 'win-node-env'
Brother, I have solved this problem. Please see if my solution can help you.
Use yarn install to install dependent packages, do not use npm
The Windows-style line break is CRLF, which is a combination of carriage return and line feed. In the project, Prettier expects the Unix-style line break to be LF, which is only line feed, so you need to run npm run format
Run yarn compile
The most important thing is that the front-end project has prettier verification. There will be errors during compilation. Use the logs to modify the areas that do not meet the specifications.
Question
when i run the command "npm run compile" ,it has some error like :
Instead change the require of E:\IdeaWorkspace\AIGC\db-gpt-web\node_modules@antv\g-lite\node_modules\d3-color\src\index.js in E:\IdeaWorkspace\AIGC\db-gpt-web\node_modules@antv\g-lite\dist\index.js to a dynamic import() which is available in all CommonJS modules.
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at Object. (E:\IdeaWorkspace\AIGC\db-gpt-web\node_modules@antv\g-lite\dist\index.js:7:10) {
code: 'ERR_REQUIRE_ESM'
}
NodeJs -> V 22.4.1
Npm -> V10.8.1
The text was updated successfully, but these errors were encountered: