I have an Expo App (which I have created with Expo, did not recall calling create-react-native-app), which I would like to be able to run both through Expo and with Xcode. So, I duplicated by copy-pasting the Expo App and run npm run eject in the project directory of a duplicate. When I did that, i get the error: missing script: eject
I expected being walked through the process of ejecting:
This is usually as simple as running
npm run ejectin your project, which will walk you through the process.
I got the error:
missing script: eject
A complete log of this run can be found in:
/Users/UserName/.npm/_logs/2017-09-28T15_03_32_533Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/8.6.0/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'eject' ]
2 info using [email protected]
3 info using [email protected]
4 verbose stack Error: missing script: eject
4 verbose stack at run (/usr/local/lib/node_modules/npm/lib/run-script.js:151:19)
4 verbose stack at /usr/local/lib/node_modules/npm/lib/run-script.js:61:5
4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:115:5
4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:402:5
4 verbose stack at checkBinReferences_ (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:357:45)
4 verbose stack at final (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:400:3)
4 verbose stack at then (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:160:5)
4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:348:12
4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16
4 verbose stack at tryToString (fs.js:514:3)
5 verbose cwd /Users/UserName/workspace/MyApps/app-number-2
6 verbose Darwin 16.5.0
7 verbose argv "/usr/local/Cellar/node/8.6.0/bin/node" "/usr/local/bin/npm" "run" "eject"
8 verbose node v8.6.0
9 verbose npm v5.4.2
10 error missing script: eject
11 verbose exit [ 1, true ]
Please run these commands in the project folder and fill in their results:
npm ls react-native-scripts:[email protected] /Users/UserName/workspace/MyApps/app-number-2-└── (empty)
npm ls react-native:npm ls expo:node -v:npm -v:yarn --version:watchman version:Please provide a minimized reproducible demonstration of the problem you're reporting.
Issues that come with minimal repro's are resolved much more quickly than issues where a maintainer has to reproduce themselves.
Hi! This script is created as part of using CRNA. If you install react-native-scripts in your Expo project and copy the CRNA package.json's scripts section, you can probably emulate this.
@dikaiosune Understood. Will try it some time. The app was installed specifically with Expo and I reckoned that it is basically the same as installing using CRNA.
@LAITONEN mind if i ask how do you "fill in the results (Please forgive me - I'm a noobie!): Please run these commands in the project folder and fill in their results:
npm ls react-native-scripts:
[email protected] /Users/UserName/workspace/MyApps/app-number-2-└── (empty)
npm ls react-native:
[email protected] /Users/UserName/workspace/MyApps/app-number-2
└── [email protected]
npm ls expo:
[email protected] /Users/UserName/workspace/MyApps/app-number-2
└── [email protected]
node -v:
v8.6.0
npm -v:
5.4.2
yarn --version:
-bash: yarn: command not found
watchman version:
{
"version": "4.9.0"
}
Also specify:
???
Have the same problem. Just created a fresh project with Expo IDE. Just wanted to eject it, to test is for future ejection and implementation of native APIs, but I get the error "missing script: eject"
@Benzer1406 we're working on adding this functionality to projects created by Expo tools, but aren't there quite yet.
@gnenov89 you run those command in your Terminal / Command Line and paste the outputs in the respective fields.
npm ERR! missing script: eject: how i fix this
npm ls react-native-scripts:
[email protected]
npm ls react-native:
[email protected]
npm ls expo:
[email protected]
node -v:
v10.7.0
npm -v:
4.6.1
yarn --version:
1.9.2
watchman version:
not installed
windows 10 / android
I having the same issue.. please help
Environment:
OS: macOS High Sierra 10.13.6
Node: 9.11.1
Yarn: 1.7.0
npm: 6.1.0
Watchman: 4.9.0
Xcode: Xcode 9.4.1 Build version 9F2000
Android Studio: 3.1 AI-173.4907809
Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: https://github.com/expo/react-native/archive/sdk-27.0.0.tar.gz => 0.55.2
Most helpful comment
@Benzer1406 we're working on adding this functionality to projects created by Expo tools, but aren't there quite yet.