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

Error while Installing react-scripts with create a new project #1200

Closed
HrudakovSerhii opened this issue Dec 8, 2016 · 17 comments · Fixed by #1204
Closed

Error while Installing react-scripts with create a new project #1200

HrudakovSerhii opened this issue Dec 8, 2016 · 17 comments · Fixed by #1204

Comments

@HrudakovSerhii
Copy link

Description

I get an error after creating new react app. It's say about Error at spawn ENOTDIR

Expected behavior

Project should created and add list of files inside a package. For me it's a first time i'm using it (begginer with ReactJS), so mb something wrong with my settings or anything else related with it.

Actual behavior

Its just fall with an error. CRA can't install react scripts.

Environment

MBP

Run these commands in the project folder and fill in their results:

  1. npm ls react-scripts (if you haven’t ejected):
  2. node -v: v7.2.1
  3. npm -v: 4.0.3

Then, specify:

  1. Operating system: MacOS Sierra 10.12.1
  2. Browser and version: Chrome 54.0.2840.98 (64-bit)

Reproducible Demo

This is screenshot of my terminal window:
2016-12-08 00 54 58

@gaearon
Copy link
Contributor

gaearon commented Dec 8, 2016

One thing that looks a bit weird is you're running the command from inside the Trash folder. Is this intentional? I don't know if there's anything preventing that but just curious if you tried creating a project outside of it.

@HrudakovSerhii
Copy link
Author

Yes, really weird... Now i try to create in non-Trash folder. And again same result:

2016-12-08 02 39 47

@gaearon
Copy link
Contributor

gaearon commented Dec 8, 2016

@fson Looks like Yarn detection code needs a try catch?

@gaearon
Copy link
Contributor

gaearon commented Dec 8, 2016

I don’t understand why this happens.
Can you give me the output of:

  • echo $PATH
  • which yarn
  • create-react-app --version

Then could you try to run npm i -g create-react-app@0.6.0 and try again. This way we can tell if it’s a new regression or not.

@HrudakovSerhii
Copy link
Author

HrudakovSerhii commented Dec 8, 2016

Ohh, yes! I forget instal yarn.. Sorry guys, it was my mistake. Now it's okay.
Should i close issue?

@gaearon
Copy link
Contributor

gaearon commented Dec 8, 2016

Hmm, it still shouldn't fail without Yarn. Yarn is not required for CRA.
I'm going to put try / catch around this code and release an update.

@HrudakovSerhii
Copy link
Author

Great! Thank you.

@gaearon
Copy link
Contributor

gaearon commented Dec 8, 2016

@SerhiiHrudakov Could you still share the output of commands in #1200 (comment)?

@HrudakovSerhii
Copy link
Author

HrudakovSerhii commented Dec 8, 2016

2016-12-08 16 19 22

Then list of files and next:

2016-12-08 16 19 59

Is it what you ask?

@gaearon
Copy link
Contributor

gaearon commented Dec 8, 2016

Sorry, could you run these commands in the terminal:

echo $PATH
which yarn
create-react-app --version

@HrudakovSerhii
Copy link
Author

Ohh, sorry. Here it is:

2016-12-08 16 44 48

@gaearon
Copy link
Contributor

gaearon commented Dec 8, 2016

Thanks!

As a matter of experiment, could you remove Yarn and try again with create-react-app@1.0.1 I just released?

npm uninstall -g yarn
npm install -g create-react-app@1.0.1

create-react-app my-app

I just want to make sure the issue is fixed. Feel free to install Yarn again afterwards (it's faster) :-)

@HrudakovSerhii
Copy link
Author

This is deleting yarn:
2016-12-08 16 50 32

Then create new CRA:
2016-12-08 16 51 24

And result:
2016-12-08 16 51 39

@gaearon
Copy link
Contributor

gaearon commented Dec 8, 2016

There is a typo in uninstall command so it didn't get uninstalled.
You typed usinstal, not uninstall.

Could you try this again please?
Sorry for bugging you.

@HrudakovSerhii
Copy link
Author

Ooo...really... Wait a minute please.

@HrudakovSerhii
Copy link
Author

2016-12-08 16 59 05

2016-12-08 16 59 51

@gaearon
Copy link
Contributor

gaearon commented Dec 8, 2016

Hmm, you still have Yarn. Maybe you didn't install it via npm?
Anyway, don't worry, it's not super important. I'm glad it works for you now.

@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants