pnpm dev 命令执行失败
aircjm opened this issue · 5 comments
aircjm commented
无法运行,使用master分支,node版本 v16.13.2,具体执行错误信息见下面:
gitpod /workspace/modern-vue-template (main) $ pnpm dev
> modern-vue@0.0.2 dev /workspace/modern-vue-template
> vite --port 3333 --open --mode development
Pre-bundling dependencies:
vite-ssg
@micro-zoe/micro-app
nprogress
pinia
vue-i18n
(...and 4 more)
(this will be run only when your dependencies or config have changed)
vite v2.7.13 dev server running at:
> Local: http://localhost:3333/
> Network: use `--host` to expose
ready in 2395ms.
node:events:368
throw er; // Unhandled 'error' event
^
Error: spawn xdg-open ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
at onErrorNT (node:internal/child_process:477:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12)
at onErrorNT (node:internal/child_process:477:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn xdg-open',
path: 'xdg-open',
spawnargs: [ 'http://localhost:3333/' ]
}
ELIFECYCLE Command failed with exit code 1.
gitpod /workspace/modern-vue-template (main) $ node -v
v16.13.2
byoungd commented
是否方便使用 node 14 版本测试一下?
我目前尚未对16版本进行测试
aircjm commented
ok 我重新试下
aircjm commented
是否方便使用 node 14 版本测试一下?
我目前尚未对16版本进行测试
gitpod /workspace/modern (main) $ pnpm dev
> modern-vue@0.0.2 dev /workspace/modern
> vite --port 3333 --open --mode development
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined
at Object.openSync (fs.js:457:10)
at readFileSync (fs.js:368:35)
at vueuse_core_default (/workspace/modern/node_modules/.pnpm/unplugin-auto-import@0.5.11_@vueuse+core@7.6.1+vite@2.8.0/node_modules/unplugin-auto-import/dist/chunk-OY3FND6V.js:320:55)
at /workspace/modern/node_modules/.pnpm/unplugin-auto-import@0.5.11_@vueuse+core@7.6.1+vite@2.8.0/node_modules/unplugin-auto-import/dist/chunk-PTDKZBIJ.js:47:51
at Array.forEach (<anonymous>)
at flattenImportsMap (/workspace/modern/node_modules/.pnpm/unplugin-auto-import@0.5.11_@vueuse+core@7.6.1+vite@2.8.0/node_modules/unplugin-auto-import/dist/chunk-PTDKZBIJ.js:42:36)
at resolveOptions (/workspace/modern/node_modules/.pnpm/unplugin-auto-import@0.5.11_@vueuse+core@7.6.1+vite@2.8.0/node_modules/unplugin-auto-import/dist/chunk-PTDKZBIJ.js:18:19)
at /workspace/modern/node_modules/.pnpm/unplugin-auto-import@0.5.11_@vueuse+core@7.6.1+vite@2.8.0/node_modules/unplugin-auto-import/dist/chunk-PTDKZBIJ.js:234:18
at /workspace/modern/node_modules/.pnpm/unplugin@0.3.2_vite@2.8.0/node_modules/unplugin/dist/index.js:681:23
at vite_config_default (/workspace/modern/vite.config.ts:152:31) {
code: 'ERR_INVALID_ARG_TYPE'
}
failed to load config from /workspace/modern/vite.config.ts
error when starting dev server:
Error: [auto-import] failed to load @vueuse/core, have you installed it?
at vueuse_core_default (/workspace/modern/node_modules/.pnpm/unplugin-auto-import@0.5.11_@vueuse+core@7.6.1+vite@2.8.0/node_modules/unplugin-auto-import/dist/chunk-OY3FND6V.js:326:13)
at /workspace/modern/node_modules/.pnpm/unplugin-auto-import@0.5.11_@vueuse+core@7.6.1+vite@2.8.0/node_modules/unplugin-auto-import/dist/chunk-PTDKZBIJ.js:47:51
at Array.forEach (<anonymous>)
at flattenImportsMap (/workspace/modern/node_modules/.pnpm/unplugin-auto-import@0.5.11_@vueuse+core@7.6.1+vite@2.8.0/node_modules/unplugin-auto-import/dist/chunk-PTDKZBIJ.js:42:36)
at resolveOptions (/workspace/modern/node_modules/.pnpm/unplugin-auto-import@0.5.11_@vueuse+core@7.6.1+vite@2.8.0/node_modules/unplugin-auto-import/dist/chunk-PTDKZBIJ.js:18:19)
at /workspace/modern/node_modules/.pnpm/unplugin-auto-import@0.5.11_@vueuse+core@7.6.1+vite@2.8.0/node_modules/unplugin-auto-import/dist/chunk-PTDKZBIJ.js:234:18
at /workspace/modern/node_modules/.pnpm/unplugin@0.3.2_vite@2.8.0/node_modules/unplugin/dist/index.js:681:23
at vite_config_default (/workspace/modern/vite.config.ts:152:31)
at loadConfigFromFile (/workspace/modern/node_modules/.pnpm/vite@2.8.0/node_modules/vite/dist/node/chunks/dep-c9c9d3e5.js:71275:15)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
ELIFECYCLE Command failed with exit code 1.
gitpod /workspace/modern (main) $ node -v
v14.8.0
gitpod /workspace/modern (main) $
还是有点问题 已经改成14版本了
byoungd commented
我今天晚些的时候来检查一下
byoungd commented
是否方便使用 node 14 版本测试一下?
我目前尚未对16版本进行测试gitpod /workspace/modern (main) $ pnpm dev > modern-vue@0.0.2 dev /workspace/modern > vite --port 3333 --open --mode development TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined at Object.openSync (fs.js:457:10) at readFileSync (fs.js:368:35) at vueuse_core_default (/workspace/modern/node_modules/.pnpm/unplugin-auto-import@0.5.11_@vueuse+core@7.6.1+vite@2.8.0/node_modules/unplugin-auto-import/dist/chunk-OY3FND6V.js:320:55) at /workspace/modern/node_modules/.pnpm/unplugin-auto-import@0.5.11_@vueuse+core@7.6.1+vite@2.8.0/node_modules/unplugin-auto-import/dist/chunk-PTDKZBIJ.js:47:51 at Array.forEach (<anonymous>) at flattenImportsMap (/workspace/modern/node_modules/.pnpm/unplugin-auto-import@0.5.11_@vueuse+core@7.6.1+vite@2.8.0/node_modules/unplugin-auto-import/dist/chunk-PTDKZBIJ.js:42:36) at resolveOptions (/workspace/modern/node_modules/.pnpm/unplugin-auto-import@0.5.11_@vueuse+core@7.6.1+vite@2.8.0/node_modules/unplugin-auto-import/dist/chunk-PTDKZBIJ.js:18:19) at /workspace/modern/node_modules/.pnpm/unplugin-auto-import@0.5.11_@vueuse+core@7.6.1+vite@2.8.0/node_modules/unplugin-auto-import/dist/chunk-PTDKZBIJ.js:234:18 at /workspace/modern/node_modules/.pnpm/unplugin@0.3.2_vite@2.8.0/node_modules/unplugin/dist/index.js:681:23 at vite_config_default (/workspace/modern/vite.config.ts:152:31) { code: 'ERR_INVALID_ARG_TYPE' } failed to load config from /workspace/modern/vite.config.ts error when starting dev server: Error: [auto-import] failed to load @vueuse/core, have you installed it? at vueuse_core_default (/workspace/modern/node_modules/.pnpm/unplugin-auto-import@0.5.11_@vueuse+core@7.6.1+vite@2.8.0/node_modules/unplugin-auto-import/dist/chunk-OY3FND6V.js:326:13) at /workspace/modern/node_modules/.pnpm/unplugin-auto-import@0.5.11_@vueuse+core@7.6.1+vite@2.8.0/node_modules/unplugin-auto-import/dist/chunk-PTDKZBIJ.js:47:51 at Array.forEach (<anonymous>) at flattenImportsMap (/workspace/modern/node_modules/.pnpm/unplugin-auto-import@0.5.11_@vueuse+core@7.6.1+vite@2.8.0/node_modules/unplugin-auto-import/dist/chunk-PTDKZBIJ.js:42:36) at resolveOptions (/workspace/modern/node_modules/.pnpm/unplugin-auto-import@0.5.11_@vueuse+core@7.6.1+vite@2.8.0/node_modules/unplugin-auto-import/dist/chunk-PTDKZBIJ.js:18:19) at /workspace/modern/node_modules/.pnpm/unplugin-auto-import@0.5.11_@vueuse+core@7.6.1+vite@2.8.0/node_modules/unplugin-auto-import/dist/chunk-PTDKZBIJ.js:234:18 at /workspace/modern/node_modules/.pnpm/unplugin@0.3.2_vite@2.8.0/node_modules/unplugin/dist/index.js:681:23 at vite_config_default (/workspace/modern/vite.config.ts:152:31) at loadConfigFromFile (/workspace/modern/node_modules/.pnpm/vite@2.8.0/node_modules/vite/dist/node/chunks/dep-c9c9d3e5.js:71275:15) at processTicksAndRejections (internal/process/task_queues.js:93:5) ELIFECYCLE Command failed with exit code 1. gitpod /workspace/modern (main) $ node -v v14.8.0 gitpod /workspace/modern (main) $
还是有点问题 已经改成14版本了
请拉取最新的代码进行测试,如果有问题可以随时联系。