create-react-app: "yarn run eject" ejected succcessfully, but followed by "The batch file cannot be found."

Can you reproduce the problem with latest npm?

Yes.

Description

I started a fresh project with create-react-app. yarn start and yarn run build runs as expected. However, when running yarn run eject, it shows Ejected successfully!, but followed by

Ejected successfully!

Please consider sharing why you ejected in this survey:
  http://goo.gl/forms/Bi6CZjk1EqsdelXk1

The batch file cannot be found.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I also tried npm run eject where it shows more error message:

Ejected successfully!

Please consider sharing why you ejected in this survey:
  http://goo.gl/forms/Bi6CZjk1EqsdelXk1

The batch file cannot be found.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! testcra7@0.1.0 eject: `react-scripts eject`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the testcra7@0.1.0 eject script 'react-scripts eject'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the testcra7 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     react-scripts eject
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs testcra7
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls testcra7
npm ERR! There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\path\to\npm-cache\_logs\2017-04-25T05_03_07_216Z-debug.log

Should I worry about this? yarn start and yarn run build still run fine after eject tho.

Expected behavior

No error message after Ejected successfully!

Actual behavior

Got error message after Ejected successfully!

Environment

  1. npm ls react-scripts (if you haven’t ejected): react-scripts@0.9.5

  2. node -v: 6.10.2

  3. npm -v: 4.5.0

  4. Operating system: Windows 7 (behind corporate firewall)

  5. Browser and version: Chrome 53.0.2785.116

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 5
  • Comments: 17 (6 by maintainers)

Most upvoted comments

I get the same error, running Windows 10. Exact same entries in my log file.

same prob… any solution … I dont running yarn together 😦

New to react-native and facing the same problem. Any update to this in the last one year?

PS: > node -v
v8.10.0
PS: > npm -v
6.0.1