Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

395
Visualizações
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\nodejs\node_modules\npm\node_modules@npmcli\promise-spawn\index.js:64:27)

    • verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run-script" "dev"

    • error command C:\WINDOWS\system32\cmd.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 npm@7.3.0
2 info using node@v15.5.1
3 timing config:load:defaults Completed in 1ms
4 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc 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:\Users\louis\Desktop\web-projects\natours\.npmrc Completed in 1ms
9 timing config:load:project Completed in 2ms
10 timing config:load:file:C:\Users\louis\.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:C:\Users\louis\AppData\Roaming\npm\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 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\nodejs\node_modules\npm\node_modules\@npmcli\promise-spawn\index.js: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 natours@1.0.0
24 verbose cwd C:\Users\louis\Desktop\web-projects\natours
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:\Users\louis\Desktop\web-projects\natours
31 error command failed
32 error command C:\WINDOWS\system32\cmd.exe /d /s /c concurrently "nodemon dist/server.js" tsc -w
33 verbose exit 1



over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

I faced the same issue and just by running the commands with the silent flag on, seems to be solving the problem. In my case I was getting the same error when i was running npm install. Running:
npm install --silent
worked. Form the flag explanation on npmjs docs --silent seems just to be hiding the messages from the terminal, but without the silent flag up, I was not able to see my node_modules installed. Now the application seems to be working fine.

over 4 years ago · Santiago Trujillo Relatório

0

Update

If you use TailwindCSS ^2.0, then make sure that your package.json file contains vue-template-compiler. This was causing all the issues to me...

Example/working package.json file

  "devDependencies": {
    "css-loader": "^5.0.1",
    "mini-css-extract-plugin": "^1.3.4",
    "postcss-loader": "^4.1.0",
    "webpack": "^5.16.0",
    "webpack-cli": "^4.5.0"
  },
  "dependencies": {
    "autoprefixer": "^10.2.4",
    "cross-env": "^7.0",
    "jquery": "^3.5.1",
    "jquery-validation-unobtrusive": "^3.2.11",
    "postcss": "^8.2.4",
    "postcss-import": "^14.0.0",
    "tailwindcss": "^2.0.2",
    "vue-template-compiler": "^2.6.12"
  }

Previous comment

  1. Remove webpack-cli from package.json (manually)
  2. Uninstall all npm modules npm uninstall *
  3. Reinstall them (without webpack-cli). Note: npm will ask you if you want webpack-cli to be installed, so just click yes) npm install
  4. It will work fine at this point (for 1 time)
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda