Create-react-app: create-react-app running error

Created on 19 Mar 2018  Â·  14Comments  Â·  Source: facebook/create-react-app

Is this a bug report?

yes

Did you try recovering your dependencies?

(Write your answer here.)

Which terms did you search for in User Guide?

(Write your answer here if relevant.)

Environment

  1. node -v: v8.10.0
  2. npm -v: from cmd: "CALL "C:\Program Filesnodejs\node.exe" "C:\Program Filesnodejs\node_modules\npm\bin\npm-cli.js" prefix -g" non è riconosciuto come comando interno o esterno,
    un programma eseguibile o un file batch.
    5.6.0
    npm -v from git bash: 5.7.1

  3. yarn --version (if you use Yarn):

  4. npm ls react-scripts (if you haven’t ejected): no output we are starting from scratch.

Then, specify:

  1. Operating system: Microsoft Windows [Versione 10.0.16299.248]
  2. Browser and version (if relevant): no relevant

Steps to Reproduce

(Write your steps here:)
from cmd
1. C:\Users\olindo>npm install -g create-react-app
"CALL "C:\Program Filesnodejs\node.exe" "C:\Program Filesnodejs\node_modules\npm\bin\npm-cli.js" prefix -g" non è riconosciuto come comando interno o esterno,
un programma eseguibile o un file batch.
C:\Users\olindo\AppData\Roaming\npmcreate-react-app -> C:\Users\olindo\AppData\Roaming\npmnode_modulescreate-react-appindex.js
+ [email protected]
updated 1 package in 3.689s

  1. C:\Users\olindo>create-react-app my-app2

Creating a new React app in C:\Users\olindo\my-app2.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...

events.js:183
throw er; // Unhandled 'error' event
^

Error: spawn C:\WINDOWS\system32\cmd.exe; ENOENT
at _errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:695:11)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3

with Git Bash

  1. $ npm install -g create-react-app
    C:\Users\olindo\AppData\Roaming\npmcreate-react-app -> C:\Users\olindo\AppData\Roaming\npmnode_modulescreate-react-appindex.js
    [email protected]
    updated 1 package in 3.284s
  1. create-react-app my-app2

Creating a new React app in C:\Users\olindo.js\my-app2.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...

events.js:183
throw er; // Unhandled 'error' event
^

Error: spawn C:\WINDOWS\system32\cmd.exe; ENOENT
at _errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:695:11)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3

Expected Behavior

the creation of my-app2 directory instrumented with all the software.

Actual Behavior


Only my-app2 and package.json was created no other files
(Write what happened. Please add screenshots!)
C:\Users\olindo\my-app2>dir
Il volume nell'unità C è Windows
Numero di serie del volume: 848B-7A22

Directory di C:\Users\olindo\my-app2

19/03/2018 12:53

.
19/03/2018 12:53 ..
19/03/2018 12:53 64 package.json

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

Most helpful comment

Fixex in System Variable there was ComSpec variable to %SystemRoot%\system32\cmd.exe;
I removed ";" and all works now!
Thanks to all

All 14 comments

👍

@pindaroli i had to downgrade to 0.9.x to get it working. perhaps its an issue with the module's own dependencies.

@jpalomar I downgrade [email protected] but I have the same problem

@pindaroli try npx create-react-app myapp

Try upgrading node, npm uninstall -g create-react-app and then use npx like @bondz is suggesting above.

@bondz the error is the same with npx

@pindaroli True. That command makesnpx use the already installed version of CRA that wasn't working for you.

Try this instead

npx -p create-react-app -c 'create-react-app myapp'

Hi! I tried:

npx -p create-react-app -c 'create-react-app myapp'

output:

C:\Users\olindo.js\test>npx -p create-react-app -c 'create-react-app myapp'
"CALL "C:\Program Filesnodejs\node.exe" "C:\Program
Filesnodejs\node_modules\npm\binnpx-cli.js" prefix -g" non è
riconosciuto come comando interno o esterno,
un programma eseguibile o un file batch.
spawn C:\WINDOWS\system32\cmd.exe; ENOENT

Thanks
Olindo

2018-03-21 14:35 GMT+01:00 Bond notifications@github.com:

@pindaroli https://github.com/pindaroli True. That command makesnpx use
the already installed version of CRA that wasn't working for you.

Try this instead

npx -p create-react-app -c 'create-react-app myapp'

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/facebook/create-react-app/issues/4180#issuecomment-374937751,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AC_WnGCZhD_vO0Avmk3GaNWKd38EeOOeks5tglcHgaJpZM4SwHDi
.

--
Olindo Pindaro
http://www.linkedin.com/in/olindopindaro
+39 3939455830

@pindaroli I think your installation of NodeJS might be corrupt. Try uninstalling nodejs, and downloading and installing a fresh LTS copy from https://nodejs.org

I'll close this because there's nothing we can help with here. Please file a support ticket with npm and try a full reinstall of your Node environment.

Fixex in System Variable there was ComSpec variable to %SystemRoot%\system32\cmd.exe;
I removed ";" and all works now!
Thanks to all

is there any solution for this ?

Yes in my case, using windows, i solved erasing trailig ';' from the
command classpath definition,

Regards
Olindo

Il giorno ven 11 mag 2018 alle ore 11:45 Hesham El Masry <
[email protected]> ha scritto:

is there any solution for this ?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/facebook/create-react-app/issues/4180#issuecomment-388316133,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AC_WnN-hPJqIUpOKOHPtGBQSQ384DzSrks5txV3FgaJpZM4SwHDi
.

--
Olindo Pindaro
http://www.linkedin.com/in/olindopindaro
+39 3939455830

@pindaroli

can you please let me know from which file did you removed the trailing ; as you mentioned above as I am also facing similar issue while using the create-react-app command to create an app.

Thanks,
Arup Chandra Dawn

Control-Panel->SystemProperties-Envirovment Variables->System Variables

"ComSpec" variable edit and look if there is a trailing ";" in definition.

Regards
Olindo

Il giorno mar 14 ago 2018 alle ore 19:27 Arup Chandra Dawn <
[email protected]> ha scritto:

@pindaroli https://github.com/pindaroli

can you please let me know from which file did you removed the trailing ;
as you mentioned above as I am also facing similar issue while using the
create-react-app command to create an app.

Thanks,
Arup Chandra Dawn

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/facebook/create-react-app/issues/4180#issuecomment-412951692,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AC_WnIeS5AlJzhV1gWqjQNuN8qaz2mjxks5uQwiTgaJpZM4SwHDi
.

--
Olindo Pindaro
http://www.linkedin.com/in/olindopindaro
+39 3939455830

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alleroux picture alleroux  Â·  3Comments

alleroux picture alleroux  Â·  3Comments

dualcnhq picture dualcnhq  Â·  3Comments

wereHamster picture wereHamster  Â·  3Comments

adrice727 picture adrice727  Â·  3Comments