打包出错 pnpm run build 不成功,求助!打包pnpm run build
php think run 安装过程中,打包步骤一直失败,出现下列错误,重新安装多次也无效
✓ built in 28.88s
node:internal/errors:496
ErrorCaptureStackTrace(err);
^
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'd:'
at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
at new NodeError (node:internal/errors:405:5)
at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:136:11)
at defaultLoad (node:internal/modules/esm/load:87:3)
at nextLoad (node:internal/modules/esm/loader:163:28)
at load (file:///D:/buildAdmin/ba4/web/node_modules/.pnpm/tsx@4.19.1/node_modules/tsx/dist/esm/index.mjs:2:1768)
at nextLoad (node:internal/modules/esm/loader:163:28)
at ESMLoader.load (node:internal/modules/esm/loader:603:26)
at ESMLoader.moduleProvider (node:internal/modules/esm/loader:457:22)
at new ModuleJob (node:internal/modules/esm/module_job:64:26)
at #createModuleJob (node:internal/modules/esm/loader:480:17)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:434:34)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:79:21) {
code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
}
Node.js v18.18.2
请先登录
热门问题
已解决,官方最新代码依赖有更新 node版本建议
20.14.0
或更高版本- 1
前往