Saturday, May 11, 2024
 Popular · Latest · Hot · Upcoming
102
rated 0 times [  104] [ 2]  / answers: 1 / hits: 6305  / 4 Years ago, sat, april 25, 2020, 12:00:00

I'm using macOs and even though concurrently is installed globally through npm, when setting it as a start script in package.json and typing npm start the following error occurs.



concurrently - kill-others npm run server npm run client
sh: concurrently - kill-others: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] start: `concurrently - kill-others npm run server npm run client`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/mantzaris/.npm/_logs/2020-04-25T22_40_12_897Z-debug.log


My package.json file :



{
name: thesis_fullstack,
version: 1.0.0,
description: ,
main: index.js,
scripts: {
client: cd client && npm start,
server: cd server && npm start,
start: concurrently - kill-others npm run server npm run client
},
keywords: [],
author: ,
license: ISC,
devDependencies: {
concurrently: 3.5.1
}
}

More From » reactjs

 Answers
14

I seriously don't know what I did to fix it. First of all i fixed the command flag typo to concurrently --kill-others your_commands_here. Then i uninstalled node manually and reinstalled it through Homebrew (since I'm using MacOs). After that node and npm wouldn't work at all. Fixed it with: https://stackoverflow.com/a/54583099/13212764. I think by that point running npm start worked.


[#4029] Thursday, April 23, 2020, 4 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
emiliano

Total Points: 381
Total Questions: 109
Total Answers: 93

Location: Jersey
Member since Fri, Oct 1, 2021
3 Years ago
emiliano questions
;