umijs / dumi

📖 Static Site Generator for component library development
https://d.umijs.org
MIT License
3.61k stars 1.18k forks source link

bug: create failed #2176

Closed hejuxin closed 3 months ago

hejuxin commented 4 months ago

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

使用命令创建项目

npx create-dumi

✔ 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

LonelyFellas commented 4 months ago

same as the problem

LonelyFellas commented 4 months ago

相同的问题🙋

PeachScript commented 4 months ago

@Jinbao1001 看看这个问题

rulifeng commented 3 months ago

同问

Jinbao1001 commented 3 months ago

sorry, 无法复现, 能提供其它信息么, 最好有个复现仓库

Jinbao1001 commented 3 months ago

没有额外信息反馈, 如有需要请重新打开.

MisterBoole commented 1 week ago

同问,也有这个问题, install 没有这个问题, build 就有了