Skip to content

failed to exec "npm run compile" in windows 10 #97

@XUANYUANRuins

Description

@XUANYUANRuins

Question

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions