-
Notifications
You must be signed in to change notification settings - Fork 810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] npm run dev执行失败 #26
Comments
在XAgentWeb目录下执行npm install时同样遇到问题 npm ERR! code ERESOLVE log文件 |
检查一下node和npm版本,node 16以上, 删掉node_modules之后重装 npm install |
最好能把node升级到20以上 |
file:///XAgent/XAgentWeb/node_modules/vite/bin/vite.js:7
await import('source-map-support').then((r) => r.default.install())
^^^^^
SyntaxError: Unexpected reserved word
at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18)
at async link (internal/modules/esm/module_job.js:42:21)
npm ERR! code 1
npm ERR! path /home/ys/XAgent/XAgentWeb
npm ERR! command failed
npm ERR! command sh -c vite --host
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2023-10-18T12_14_44_491Z-debug.log
执行失败log ( /root/.npm/_logs/2023-10-18T12_14_44_491Z-debug.log )
0 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'dev' ]
1 info using npm@7.5.2
2 info using node@v12.22.12
3 timing config:load:defaults Completed in 1ms
4 timing config:load:file:/usr/share/nodejs/npm/npmrc Completed in 1ms
5 timing config:load:builtin Completed in 1ms
6 timing config:load:cli Completed in 1ms
7 timing config:load:env Completed in 0ms
8 timing config:load:file:/home/ys/XAgent/XAgentWeb/.npmrc Completed in 0ms
9 timing config:load:project Completed in 1ms
10 timing config:load:file:/root/.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 0ms
17 timing config:load:setEnvs Completed in 0ms
18 timing config:load Completed in 5ms
19 verbose npm-session 8f61d137f4f07a4c
20 timing npm:load Completed in 11ms
21 timing command:run-script Completed in 82ms
22 verbose stack Error: command failed
22 verbose stack at ChildProcess. (/usr/share/nodejs/@npmcli/promise-spawn/index.js:64:27)
22 verbose stack at ChildProcess.emit (events.js:314:20)
22 verbose stack at maybeClose (internal/child_process.js:1022:16)
22 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
23 verbose pkgid xagent@0.0.0
24 verbose cwd /XAgent/XAgentWeb
25 verbose Linux 5.10.0-23-amd64
26 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "dev"
27 verbose node v12.22.12
28 verbose npm v7.5.2
29 error code 1
30 error path /home/ys/XAgent/XAgentWeb
31 error command failed
32 error command sh -c vite --host
33 verbose exit 1
The text was updated successfully, but these errors were encountered: