question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"yarn run eject" ejected succcessfully, but followed by "The batch file cannot be found."

See original GitHub issue

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

Issue Analytics

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

github_iconTop GitHub Comments

9reactions
jasenfcommented, May 19, 2017

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

2reactions
K4bl0-Skat3Rcommented, Nov 23, 2017

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

"npm run eject" ejected succcessfully, but followed by "The ...
I created a fresh project with create-react-native-app .However, when running npm run eject , it shows Ejected successfully!, but followed ...
Read more >
Hardhat errors | Ethereum development environment for ...
You are trying to create a new hardhat project, but there are existing files that would be overwritten by the creation process. Either...
Read more >
CLI - Prettier
Use the prettier command to run Prettier from the command line. ... To run your locally installed version of Prettier, prefix the command...
Read more >
Fix for PowerShell Script cannot be loaded because running ...
On trying to run a PowerShell script from the PowerShell console, received this error message: “File C:\temp\GenerateRpt.ps1 cannot be loaded ...
Read more >
Install GitLab Runner on Windows
I can't run Windows BASH scripts; I'm getting The system cannot find the batch label specified - buildscript. You need to prepend call...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found