Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
193 views
in Technique[技术] by (71.8m points)

node.js - I can't execute npm scripts in node why is this happening and how can i solve it

I need help fixing this problem I hope this can help and I tried running other commands in my terminal but it did not work 15.5.1

My version of node is the latest one.

  • The code says three things

    • Commmand failed at ChildProcess. (C:Program Files odejs ode_modules pm [email protected]:64:27)

    • verbose argv "C:Program Files odejs ode.exe" "C:Program Files odejs ode_modules pmin pm-cli.js" "run-script" "dev"

    • error command C:WINDOWSsystem32cmd.exe /d /s /c concurrently?"nodemon dist/server.js"?tsc?-w


0 verbose cli [
0 verbose cli   'C:\Program Files\nodejs\node.exe',
0 verbose cli   'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
0 verbose cli   'run-script',
0 verbose cli   'dev'
0 verbose cli ]
1 info using [email protected]
2 info using [email protected]
3 timing config:load:defaults Completed in 1ms
4 timing config:load:file:C:Program Files
odejs
ode_modules
pm
pmrc Completed in 2ms
5 timing config:load:builtin Completed in 2ms
6 timing config:load:cli Completed in 1ms
7 timing config:load:env Completed in 0ms
8 timing config:load:file:C:UserslouisDesktopweb-projects
atours.npmrc Completed in 1ms
9 timing config:load:project Completed in 2ms
10 timing config:load:file:C:Userslouis.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:C:UserslouisAppDataRoaming
pmetc
pmrc 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 1ms
16 timing config:load:setUserAgent Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 8ms
19 verbose npm-session 09d944228c5c6035
20 timing npm:load Completed in 18ms
21 timing command:run-script Completed in 464ms
22 verbose stack Error: command failed
22 verbose stack     at ChildProcess.<anonymous> (C:Program Files
odejs
ode_modules
pm
[email protected]:64:27)
22 verbose stack     at ChildProcess.emit (node:events:376:20)
22 verbose stack     at maybeClose (node:internal/child_process:1063:16)
22 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:295:5)
23 verbose pkgid [email protected]
24 verbose cwd C:UserslouisDesktopweb-projects
atours
25 verbose Windows_NT 10.0.19041
26 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run-script" "dev"
27 verbose node v15.5.1
28 verbose npm  v7.3.0
29 error code 1
30 error path C:UserslouisDesktopweb-projects
atours
31 error command failed
32 error command C:WINDOWSsystem32cmd.exe /d /s /c concurrently?"nodemon dist/server.js"?tsc?-w
33 verbose exit 1



question from:https://stackoverflow.com/questions/65602290/i-cant-execute-npm-scripts-in-node-why-is-this-happening-and-how-can-i-solve-it

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...