`npm start` failed after `npm run eject` - react-native

Command start unrecognized. Make sure that you have run npm install and that you are inside a react-native project.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # start: react-native start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # 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\Ishan\AppData\Roaming\npm-cache_logs\2019-02-24T11_24_50_101Z-debug.log

You are missing a start script in your package.json
Your package.json must have a start script like so -
{
"scripts": {
"start": "react-native-scripts start"
}
}

Related

npm error: Failed at the sodium#3.0.2 preinstall script

i get:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sodium#3.0.2 preinstall: `node install.js --preinstall`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sodium#3.0.2 preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
when trying to run "npm install"
why is this? i tried looking at other threads and nothing works for me.

React app: npm run build throws "sh: cross-env: command not found" even after running npm i

I have been unable to run the command npm run build unsuccessfully, I get the following issue:
> #myer-online/frontend#1.0.0 build /Users/surbhimidha/myer-online
> cross-env NODE_ENV=production next build
sh: cross-env: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! #myer-online/frontend#1.0.0 build: `cross-env NODE_ENV=production next build`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the #myer-online/frontend#1.0.0 build 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/surbhimidha/.npm/_logs/2021-02-10T08_06_42_019Z-debug.log
I am using the following versions of node and npm:
npm: 6.14.8
node: 14.13.1
I have tried to delete node modules and run npm i but still I get the above error when I run npm run build
I noticed that cross-env is not present under /node_modules/.bin
Please help!

Error while executing "npm start" command

I installed npm and changed the package.json file so that it can automatically compile the .scss file into a css file when npm start is used. the changes made are as follows.
"scripts": {
"start": "npm run watch:all",
"test": "echo \"Error: no test specified\" && exit 1",
"lite": "lite-server",
"scss": "node-sass -o css/ css/",
"watch:scss":"onchange \"css/*.scss\" -- npm run scss",
"watch:all":"parallelshell \"npm run watch:scss\" \"npm run lite\""
},
but when I run the "npm start" command it returns an error. The error is as follows.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! confusion#1.0.0 watch:all: `parallelshell "npm run watch:scss" "npm run lite"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the confusion#1.0.0 watch:all 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\DJ\AppData\Roaming\npm-cache\_logs\2020-07-16T15_52_00_182Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! confusion#1.0.0 start: `npm run watch:all`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the confusion#1.0.0 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\DJ\AppData\Roaming\npm-cache\_logs\2020-07-16T15_52_00_229Z-debug.log
please help me solve this problem,
I want to complete my project but this error is in my way.
It is a bug from parallelshell. We will have to manually edit file to fix this error
You need to go to the file:
node_modules/parallelshell/index.js:105
Then change this line:
cwd: process.versions.node < '8.0.0' ? process.cwd : process.cwd(),
To this:
cwd: parseInt(process.versions.node) < 8 ? process.cwd : process.cwd()
Then things will work well

Local package.json exists, but node_modules missing, did you mean to install?

I am trying to clone and use pix/pix in my laptop for a university project
(https://github.com/1024pix/pix). But I am getting the following error:
H:\Bachelor YGREC - Modelling & Data Science\Bachelor Year 1\Project\Project 2\pix>npm run configure
> pix#2.116.0 configure H:\Bachelor YGREC - Modelling & Data Science\Bachelor Year 1\Project\Project 2\pix
> npm install && run-s ci:all test configure:api
> pix#2.116.0 preinstall H:\Bachelor YGREC - Modelling & Data Science\Bachelor Year 1\Project\Project 2\pix
> test "$(npm --version)" = 6.13.4
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pix#2.116.0 preinstall: `test "$(npm --version)" = 6.13.4`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pix#2.116.0 preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-02-24T10_36_42_126Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pix#2.116.0 configure: `npm install && run-s ci:all test configure:api`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pix#2.116.0 configure script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-02-24T10_36_42_183Z-debug.log
You should have found the answer by now but if someone else find it useful, just run npm install in your console.
Write npm start in the terminal followed by npm install. This will solve your issue.

Why npm start is not working and giving the following error messages:

I have one question regarding npm. Whenever I start npm, it gives the following error:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pomodorclock#1.0.0 start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pomodorclock#1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
You first need to run npm install before you can build the package. After you can use npm start.