Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Getting an error when using concurrently to run front and backend using npm run both script


npm run both
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

> inotebook@0.1.0 both
> concurrently "npm run start" "nodemon backend/index.js"

[1]   Usage: nodemon [nodemon options] [script.js] [args]
[1]
[1]   See "nodemon --help" for more.
[1]
[1] nodemon backend/index.js exited with code 0
[0] npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
[0] npm ERR! code ENOENT
[0] npm ERR! syscall open
[0] npm ERR! path C:\Users\Shakir/package.json
[0] npm ERR! errno -4058
[0] npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\Shakir\package.json'
[0] npm ERR! enoent This is related to npm not being able to find a file.
[0] npm ERR! enoent

while trying to run frontend and backend using concurrently i added both script in package.json and when I use the npm run both i am getting error

  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "both": "concurrently \"npm run start\" \"nodemon backend/index.js\""
  },

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

try to use && to launch both

  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "both": "npm run start && nodemon './backend/index.js'"
  },

How can I run multiple npm scripts in parallel?

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading