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

npm start not working #10429

Closed
hamed-iam opened this issue Jan 24, 2021 · 3 comments
Closed

npm start not working #10429

hamed-iam opened this issue Jan 24, 2021 · 3 comments

Comments

@hamed-iam
Copy link

hameds-MacBook-Pro:React-course Hamed_Iam$ npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /Users/Hamed_Iam/Desktop/React-course/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/Hamed_Iam/Desktop/React-course/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! /Users/Hamed_Iam/.npm/_logs/2021-01-24T08_26_52_110Z-debug.log

package.json

{
"name": "my-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.11.9",
"@testing-library/react": "^11.2.3",
"@testing-library/user-event": "^12.6.2",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-scripts": "4.0.1",
"web-vitals": "^0.2.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}

@dimadk24
Copy link

Please provide more detailed steps that led to this issue. From the log above seems like you don't have the package.json file in the folder where you run npm start. Maybe you ran npm start in the wrong folder?

@ibrahim-ih
Copy link

ibrahim-ih commented Jan 25, 2021

You need to cd into the directory which holds package.json.
cd React-course

@hamed-iam
Copy link
Author

@ibrahim-ih @DimaDK02 Thank you, yes I was in the wrong folder, took me a while to get that, thank you

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

3 participants