Skip to content
This repository has been archived by the owner on Jan 26, 2019. It is now read-only.

The batch file cannot be found error when we run npm run eject #67

Closed
jquintozamora opened this issue May 22, 2017 · 6 comments
Closed

Comments

@jquintozamora
Copy link

Actual behavior

When ejecting the project, I got an error like:
The batch file cannot be found error
image

Environment

Run these commands in the project folder and fill in their results:
node -v: 7.9.0
npm -v: 4.5.0
Operating system: Windows 8

Reproducible Demo

npm install -g create-react-app
create-react-app my-app --scripts-version=react-scripts-ts
cd my-app/
npm run eject

@wmonk
Copy link
Owner

wmonk commented May 22, 2017

I'm afraid I can't reproduce this, as I don't have a windows machine. I assume as it's printed the Ejected successfully! message it must be an inquirer issue.

@ttrunck
Copy link

ttrunck commented May 22, 2017

I'm not able to reproduce it on Windows 10. But it seems that your eject is done using a quite old version of Yarn (and not using npm). Could this be the issue, did you tried to update Yarn?

@wmonk
Copy link
Owner

wmonk commented Jun 15, 2017

Closing as this hasn't been updated in a while.

@wmonk wmonk closed this as completed Jun 15, 2017
@gaearon
Copy link
Contributor

gaearon commented Jan 15, 2018

If you're curious about why this was happening: facebook/create-react-app#3806 (comment)

We disabled Yarn during eject so it stopped, but there probably is some correct solution here.

@NotAdrian
Copy link

I just looked into it, after some hours I found the reason and created a Comment on another issue here, its pretty much a operating system (Windows < 10) issue. For a more detailed report I'm just going to leave the link from my other comment here: Click me

@ibrhm-mnf
Copy link

ibrhm-mnf commented Jul 21, 2018

Instead of using "npm run eject"
use "npm install -g exp" & "exp detach"
And edit varibles in app.json file https://docs.expo.io/versions/latest/workflow/configuration

This will create android & ios files respectively

Thank you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants