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.

npm run eject fails

See original GitHub issue

Description

npm run eject fails while npm start runs successfully. have tried with version 8 of node js as well but no luck.

Expected Behavior

npm run eject should complete without error

Observed Behavior

get the erorr message below:-

npm ERR! Windows_NT 10.0.14393 npm ERR! argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “run” “eject” npm ERR! node v7.10.1 npm ERR! npm v4.2.0 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! firstApp@0.1.0 eject: react-native-scripts eject npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the firstApp@0.1.0 eject script ‘react-native-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 firstApp package, npm ERR! not with npm itself.

more details from C:\Users\AppData\Roaming\npm-cache_logs\2018-01-16T09_36_58_097Z-debug.log

4 verbose run-script [ ‘preeject’, ‘eject’, ‘posteject’ ] 5 info lifecycle firstApp@0.1.0~preeject: firstApp@0.1.0 6 silly lifecycle firstApp@0.1.0~preeject: no script for preeject, continuing 7 info lifecycle firstApp@0.1.0~eject: firstApp@0.1.0 8 verbose lifecycle firstApp@0.1.0~eject: unsafe-perm in lifecycle true 9 verbose lifecycle firstApp@0.1.0~eject: PATH: **** 10 verbose lifecycle firstApp@0.1.0~eject: CWD: C:\Users\Desktop\TempWrk\mobile\firstApp 11 silly lifecycle firstApp@0.1.0~eject: Args: [ ‘/d /s /c’, ‘react-native-scripts eject’ ] 12 silly lifecycle firstApp@0.1.0~eject: Returned: code: 1 signal: null 13 info lifecycle firstApp@0.1.0~eject: Failed to exec eject script 14 verbose stack Error: firstApp@0.1.0 eject: react-native-scripts eject 14 verbose stack Exit status 1 14 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:279:16) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at EventEmitter.emit (events.js:194:7) 14 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at ChildProcess.emit (events.js:194:7) 14 verbose stack at maybeClose (internal/child_process.js:899:16) 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) 15 verbose pkgid firstApp@0.1.0

Environment

Please run these commands in the project folder and fill in their results:

  • npm ls react-native-scripts: (empty)
  • npm ls react-native: react-native@0.50.3
  • npm ls expo: (empty)
  • node -v: v7.10.1
  • npm -v: 4.2.0
  • yarn --version: not installed
  • watchman version: tried installing this but, it says package no longer supported.

Also specify:

  1. Operating system: Windows 10
  2. Phone/emulator/simulator & version:

Reproducible Demo

fails the last step below npm install -g create-react-native-app create-react-native-app firstApp npm run eject

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
Luismi74commented, Aug 1, 2018

my solution: npm install -g react-native-scripts then run react-native-scripts eject . this will do the same as npm run eject. hope it works!

0reactions
Santhoshsantocommented, Jul 7, 2021

[android.dangerous]: withAndroidDangerousBaseMod: Source and destination must not be the same. Error: [android.dangerous]: withAndroidDangerousBaseMod: Source and destination must not be the same.

This issue finding me after giving npm eject

how to fix this thanks in advance

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm run eject error? [closed] - reactjs - Stack Overflow
This error occurs after I run npm run eject in my react project. Maybe someone knows how to solve this problem (error in...
Read more >
Git error when trying to 'npm run eject' · Issue #4535 - GitHub
I have run create-react-app and then ran npm run eject...also have tried yarn eject in the hopes of adding CSS Modules to my...
Read more >
Problem in Ejecting React Native Project (npm run eject issue ...
The problem happens when we create a project using create-react-native-app and try to eject the project using npm run eject . It shows...
Read more >
Error with run "npm run eject". Error 'Remove untracked files ...
This says in the message that you have untracked files that means that they are not being monitored by your VCS. Hence add...
Read more >
Everything you need to know about react-scripts
To run the command on the terminal, type the following command. yarn eject npm run eject. Ejecting helps you to customize anything in...
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