Skip to content
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

failed to npm start #1

Open
codersaiful opened this issue Jun 13, 2021 · 11 comments
Open

failed to npm start #1

codersaiful opened this issue Jun 13, 2021 · 11 comments

Comments

@codersaiful
Copy link

Where the problem. I followed your provided step.

$ npm start

[email protected] start G:\Node\uptime-monitoring-api-raw-node
NODE_ENV=staging nodemon index

'NODE_ENV' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: NODE_ENV=staging nodemon index
npm ERR! Exit status 1
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! C:\Users\MyUsername\AppData\Roaming\npm-cache_logs\2021-06-13T09_12_36_512Z-debug.log`

how can I solve it?

@mmesba
Copy link

mmesba commented Jun 13, 2021

Probably you are in windows. These commands are written for Mac or Linux. You can try like below:
"scripts": { "start": "SET NODE_ENV=staging&&nodemon index", "production": "SET NODE_ENV=production&&nodemon index", "test": "echo \"Error: no test specified\" && exit 1" },

try it and replay here...

@codersaiful
Copy link
Author

yes, I m windows user.

@codersaiful
Copy link
Author

Let me try

@codersaiful
Copy link
Author

Still same issue, Check bellow Please. [Screenshot Provided]

$ npm start

[email protected] start G:\Node\uptime-monitoring-api-raw-node
SET NODE_ENV=staging&&nodemon index

'nodemon' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: SET NODE_ENV=staging&&nodemon index
npm ERR! Exit status 1
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! C:\Users\CodeOffice\AppData\Roaming\npm-cache_logs\2021-06-13T10_59_50_095Z-debug.log
Error Screenshot

@sabbir2609
Copy link

put a space after &&

@sabbir2609
Copy link

and install nodemon

@mdsifath70
Copy link

Error Screenshot

You can remove &&

@Shiham123
Copy link

image_2024-03-01_164325107

not working

@Shiham123
Copy link

image

@Shiham123
Copy link

if i "npm run production then it only run one time and instand stop", if i put && this before nodemon then i am not able to switch between two production and staging

@Shiham123
Copy link

image

don't wokring any of avobe solution i found this for manually switch between two

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants