fatal - Error: Register plugin /Users/x/cloud-x-dumi/nodemodules/.pnpm/dumi@2.4.6@babel+core@7.24.9@types+node@20.5.1@types+react@18.3.3_eslint@8.57.0_prettier@2_mp57ai3adwepgc4wlknk34gnxy/node_modules/dumi/dist/features/compile/index.js failed, since Unexpected token 'export'
at Plugin.apply (/Users/x/cloud-x-dumi/node_modules/.pnpm/@umijs+core@4.3.6/node_modules/@umijs/core/dist/service/plugin.js:76:15)
at DumiService.initPlugin (/Users/x/cloud-x-dumi/node_modules/.pnpm/@umijs+core@4.3.6/node_modules/@umijs/core/dist/service/service.js:463:33)
at DumiService.run (/Users/x/cloud-x-dumi/node_modules/.pnpm/@umijs+core@4.3.6/node_modules/@umijs/core/dist/service/service.js:259:18)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async DumiService.run2 (/Users/x/cloud-x-dumi/nodemodules/.pnpm/umi@4.3.6@babel+core@7.24.9@types+node@20.5.1@types+react@18.3.3_eslint@8.57.0_prettier@2._rbnyyemivrfem4yh3mxoudx6jy/node_modules/umi/dist/service/service.js:65:12)
at async run (/Users/x/cloud-x-dumi/nodemodules/.pnpm/dumi@2.4.6@babel+core@7.24.9@types+node@20.5.1@types+react@18.3.3_eslint@8.57.0_prettier@2_mp57ai3adwepgc4wlknk34gnxy/node_modules/dumi/dist/service/cli.js:57:7)
at async /Users/x/cloud-x-dumi/nodemodules/.pnpm/dumi@2.4.6@babel+core@7.24.9@types+node@20.5.1@types+react@18.3.3_eslint@8.57.0_prettier@2_mp57ai3adwepgc4wlknk34gnxy/node_modules/dumi/dist/cli.js:30:5 {
export interface Plugin {
^^^^^^
SyntaxError: Unexpected token 'export'
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1274:20)
at Module._compile (node:internal/modules/cjs/loader:1320:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
at Object.newLoader [as .ts] (/Users/x/cloud-x-dumi/node_modules/.pnpm/@umijs+utils@4.3.6/node_modules/@umijs/utils/compiled/pirates/index.js:1:1684)
at Module.load (node:internal/modules/cjs/loader:1197:32)
at Module._load (node:internal/modules/cjs/loader:1013:12)
at Module.require (node:internal/modules/cjs/loader:1225:19)
at require (node:internal/modules/helpers:177:18)
at Object. (/Users/x/cloud-x-dumi/node_modules/.pnpm/@swc+core@1.4.2/node_modules/@swc/core/index.js:51:14)
}
fatal - Consider reporting a GitHub issue on https://github.com/umijs/dumi/issues
ELIFECYCLE Command failed with exit code 1.
Version
2.4.6
OS Version
macOS 14.1
Node.js Version
18.19.1
Browser Version
版本 126.0.6478.128(正式版本) (arm64)
Link to minimal reproduction
none
Steps to reproduce
使用命令创建项目
✔ Pick template type › React Library ✔ Pick NPM client › pnpm
What is expected?
success
What is actually happening?
fatal - Error: Register plugin /Users/x/cloud-x-dumi/nodemodules/.pnpm/dumi@2.4.6@babel+core@7.24.9@types+node@20.5.1@types+react@18.3.3_eslint@8.57.0_prettier@2_mp57ai3adwepgc4wlknk34gnxy/node_modules/dumi/dist/features/compile/index.js failed, since Unexpected token 'export' at Plugin.apply (/Users/x/cloud-x-dumi/node_modules/.pnpm/@umijs+core@4.3.6/node_modules/@umijs/core/dist/service/plugin.js:76:15) at DumiService.initPlugin (/Users/x/cloud-x-dumi/node_modules/.pnpm/@umijs+core@4.3.6/node_modules/@umijs/core/dist/service/service.js:463:33) at DumiService.run (/Users/x/cloud-x-dumi/node_modules/.pnpm/@umijs+core@4.3.6/node_modules/@umijs/core/dist/service/service.js:259:18) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async DumiService.run2 (/Users/x/cloud-x-dumi/nodemodules/.pnpm/umi@4.3.6@babel+core@7.24.9@types+node@20.5.1@types+react@18.3.3_eslint@8.57.0_prettier@2._rbnyyemivrfem4yh3mxoudx6jy/node_modules/umi/dist/service/service.js:65:12) at async run (/Users/x/cloud-x-dumi/nodemodules/.pnpm/dumi@2.4.6@babel+core@7.24.9@types+node@20.5.1@types+react@18.3.3_eslint@8.57.0_prettier@2_mp57ai3adwepgc4wlknk34gnxy/node_modules/dumi/dist/service/cli.js:57:7) at async /Users/x/cloud-x-dumi/nodemodules/.pnpm/dumi@2.4.6@babel+core@7.24.9@types+node@20.5.1@types+react@18.3.3_eslint@8.57.0_prettier@2_mp57ai3adwepgc4wlknk34gnxy/node_modules/dumi/dist/cli.js:30:5 {
export interface Plugin { ^^^^^^
SyntaxError: Unexpected token 'export' at internalCompileFunction (node:internal/vm:73:18) at wrapSafe (node:internal/modules/cjs/loader:1274:20) at Module._compile (node:internal/modules/cjs/loader:1320:27) at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) at Object.newLoader [as .ts] (/Users/x/cloud-x-dumi/node_modules/.pnpm/@umijs+utils@4.3.6/node_modules/@umijs/utils/compiled/pirates/index.js:1:1684) at Module.load (node:internal/modules/cjs/loader:1197:32) at Module._load (node:internal/modules/cjs/loader:1013:12) at Module.require (node:internal/modules/cjs/loader:1225:19) at require (node:internal/modules/helpers:177:18) at Object. (/Users/x/cloud-x-dumi/node_modules/.pnpm/@swc+core@1.4.2/node_modules/@swc/core/index.js:51:14)
}
fatal - Consider reporting a GitHub issue on https://github.com/umijs/dumi/issues
ELIFECYCLE Command failed with exit code 1.
Any additional comments? (optional)
No response