Error while Installing react-scripts with create a new project
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:
npm ls react-scripts(if you haven’t ejected):node -v: v7.2.1npm -v: 4.0.3
Then, specify:
- Operating system: MacOS Sierra 10.12.1
- Browser and version: Chrome 54.0.2840.98 (64-bit)
Reproducible Demo
This is screenshot of my terminal window:

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.
Yes, really weird... Now i try to create in non-Trash folder. And again same result:
@fson Looks like Yarn detection code needs a try catch?
I don’t understand why this happens. Can you give me the output of:
echo $PATHwhich yarncreate-react-app --version
Then could you try to run npm i -g [email protected] and try again. This way we can tell if it’s a new regression or not.
Ohh, yes! I forget instal yarn.. Sorry guys, it was my mistake. Now it's okay. Should i close issue?
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.
Great! Thank you.
@SerhiiHrudakov Could you still share the output of commands in https://github.com/facebookincubator/create-react-app/issues/1200#issuecomment-265757559?
Then list of files and next:
Is it what you ask?
Sorry, could you run these commands in the terminal:
echo $PATH
which yarn
create-react-app --version
Ohh, sorry. Here it is:

Thanks!
As a matter of experiment, could you remove Yarn and try again with [email protected] I just released?
npm uninstall -g yarn
npm install -g [email protected]
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) :-)
This is deleting yarn:

Then create new CRA:

And result:

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.
Ooo...really... Wait a minute please.
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.