-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
'react-scripts' is not recognized as an internal or external command, operable program or batch file. #1627
Comments
Does this variation work? "scripts": {
"build-css": "node-sass src/ -o src/",
"build-js": "react-scripts build",
"build": "npm run build-css && npm run build-js",
"start-css": "npm run build-css && npm run build-css -- --watch --recursive",
"start-js": "react-scripts start",
"start": "npm-run-all -p start-css start-js",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}, |
(Update: edited suggestion above. Can you try the last version I posted?) |
It doesn't work. I forgot to add this part of error
|
Could it be that your If it doesn't work please post the complete output again. |
I tried it.... same error. This is entire output
|
@mysticatea Do you think you could shed any light on this? |
Wait... You're saying Can you show your full |
Did you do anything to your project folder at all? Like, move it somewhere, or copy and paste files. |
nop, i didn't move it but I don't see react-scripts folder in node_modules. |
Can you show me the full |
|
I apologize for wasting your time, it seems that my colleague did "eject" |
You didn't mention that you ejected. 😉 |
Right. So you'll need to replace |
I have same problem, but I still not know how to fix it
Please give me somecode, or exaclly how to fix ?
|
You have not "ejected" so the advice in this thread is not relevant to you. As we found out in #1627 (comment), original poster has "ejected" which is why In your case, however, it should exist. So if you have this problem, it might mean that npm didn't properly install the package. Can you verify |
I am having the same issue here. I created a working app using create-react-app on a separate machine, and pushed to github. On this machine, I cloned the repo and attempted to run My very simple package.json:
|
It is not enough to run
|
Also, make sure that NODE_ENV is not set to a production on a development machine. I was using react-scripts-ts in the package.json devDependencies and NODE_ENV was somehow in the production mode and therefore npm/yarn didn't install react-scripts-ts.
|
This is interesting. Maybe we should just move them to |
@gaearon I am not 100% if that is a good way to solve the issue as the original fault was mine. I left the NODE_ENV to a wrong state. On the actual production environment, it would load extraneous packages? I guess, my original reason was to try running production mode on some other project and forgot to change back to the development. These days I run my npm scripts like this to just to be sure:
That command works at least on my cygwin bash on Windows machine. |
That's not how it works. In practice, for CRA "production environment" doesn't make sense because your build output is HTML/JS/CSS and not a Node app. |
@gaearon I am getting similar error: I haven't
And
and there is Having this error message:
Tried I started afresh.
After
gave below error. (I didn't run npm install now. Though there is node_modules/ with
Ran EDIT: Tried with an old package.json from your comment #1363 (comment). It'sworking now. Not sure about the current issue though. |
The error message says:
"ENOSPC" means "no space". Your disk ran out of space and it is causing issues. |
Er.. I have around 98GB of free space. And using an old |
I still have this error. I do "npm install". After this command, it gets solved for a while. After an hour or so, I get this again. |
Note from maintainers: if you came here from search, your issue is likely unrelated to this thread. Just run
npm install
beforenpm start
and you’ll be fine. See the explanation.Description
I followed instructions when setting up sass but after did the last step I get error in the title
these are scripts in json package
"scripts": {
"build-css": "node-sass src/ -o src/",
"watch-css": "npm run build-css && node-sass src/ -o src/ --watch --recursive",
"start-js": "react-scripts start",
"start": "npm-run-all -p watch-css start-js",
"build": "npm run build-css && react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
Expected behavior
If it was normal it would start the server and it would compile sass files
Actual behavior
In cli it should run script normally but I get error 'react-scripts' is not recognized as an internal or external command, operable program or batch file.'
'react-scripts' is not recognized as an internal or external command, operable program or batch file.
Environment
Run these commands in the project folder and fill in their results:
npm ls react-scripts
(if you haven’t ejected): `--(empty)node -v
: v7.0.0npm -v
: v3.10.8Then, specify:
The text was updated successfully, but these errors were encountered: