An error occurred while following creat-react-app - javascript

I want to solve these errors quickly and study. But the search continues and the symptoms continue to appear even though others have tried to do so.
> hello-react#0.1.0 start /Users/kimseungwon/hello-react
> react-scripts start
> npm ERR! file sh
> npm ERR! path sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn sh
npm ERR! hello-react#0.1.0 start: `react-scripts start`
npm ERR! spawn sh ENOENT
npm ERR!
npm ERR! Failed at the hello-react#0.1.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! /Users/kimseungwon/.npm/_logs/2018-09-02T08_28_05_806Z-debug.log
node version: 8.11.4
npm version: 5.6.0
Why is this happening?

You don't need to run the project with react-scripts command, just you should using the npm command as below as you can see in package.json scripts object:
npm run start

Related

I have this error message "npm ERR! Linux 5.4.72-microsoft-standard-WSL2" on my terminal when I run "npm install"

I have this error message : npm ERR! Linux 5.4.72-microsoft-standard-WSL2 on my terminal when I run npm install. I'm on a vue.js app and I have this message since I installed vuetify.
Here is the whole error message :
npm ERR! Linux 5.4.72-microsoft-standard-WSL2
npm ERR! argv "/home/josephine/.nvm/versions/node/v14.15.0/bin/node" "/home/josephine/.nvm/versions/node/v14.15.0/bin/npm" "install"
npm ERR! node v14.15.0
npm ERR! npm v3.10.10
npm ERR! cb.apply is not a function.
I also cannot install the latest version of npm I think this is related to the problem. (I have this version v3.10.10).
And when I run npm run serve I have this :
> vue-cli-service serve
sh: 1: vue-cli-service: not found
npm ERR! Linux 5.4.72-microsoft-standard-WSL2
npm ERR! argv "/home/josephine/.nvm/versions/node/v14.15.0/bin/node" "/home/josephine/.nvm/versions/node/v14.15.0/bin/npm" "run" "serve"
npm ERR! node v14.15.0
npm ERR! npm v3.10.10
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! my-app#0.1.0 serve: vue-cli-service serve
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the my-app#0.1.0 serve script 'vue-cli-service serve'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the my-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! vue-cli-service serve
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs my-app
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls my-app
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?`.
I have the Vue.JS version # vue / cli 4.5.12.
At last, I have a Window PC and I have installed linux and ubuntu.
I thank you in advance if you can help me.
Your npm version is outdated. Your version is 3.x but we're currently at 7.x
Run
npm update -g
and then try again.

New to react could not start server got error messages any idea?

PS C:\Users\USER\Desktop\react> npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\USER\Desktop\react\package.json
npm ERR! errno -4058
'C:\Users\USER\Desktop\react\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\USER\AppData\Roaming\npm-cache_logs\2020-10-15T10_23_32_090Z-debug.log
It looks like you're trying to run an npm script such as "npm start" in a folder that doesn't have a "package.json" file. Make sure you are in your React project's working directory and try again.

Deploying React app to Github Pages issue

I've deployed my react app to github pages, now I want to deploy an updated version, but when I run npm run deploy it returns me:
EACCES: permission denied, rmdir '/Users/progbash/Desktop/milijonasroziu/build/static/css'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! milijonasroziu#0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the milijonasroziu#0.1.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/progbash/.npm/_logs/2020-02-19T22_35_43_611Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! milijonasroziu#0.1.0 predeploy: `npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the milijonasroziu#0.1.0 predeploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

"babel-node: not found" with react-native

i getting this type of error while running the other project in my Linux system.
sh: 1: babel-node: not found
npm ERR! code ELIFECYCLE
npm ERE! syscall spawn
npm ERR! file sh
npm ERR! ENOENT errno
npm ERR! react-native-activity-feed-showcase#.1.0 init-data: babel-node scripts/initData.js
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the init-data script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

how do I create a new project with create-react-app

I new started use for mac os. While created a new project with create-react-app, I take a that error:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! recipe#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the recipe#0.1.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! /Users/macbook/.npm/_logs/2019-08-21T16_25_25_607Z-debug.log
You need to run:
npm install
Before you can run:
npm start

Categories