Error after 'npm run eject'

I created an react project by executing the command ‘expo init’ (created a blank project)
I ran this on an android emulator (works good)

I want to get out from expo as I have some custom code.
so I executed I executed ‘npm run eject’

it went well, then I executed

‘react-native run-android’ to open the app on an android emulator

I am getting the following error

PS C:\mobileApp\one> react-native run-android
C:\mobileApp\one\node_modules\react-native\local-cli\core\index.js:128
function getCliConfig(){var cliArgs,config,expoAssetPluginPath;return regeneratorRuntime.async(function getCliConfig$(_context){while(1){switch(_context.prev=_context.next){case 0:
^

ReferenceError: regeneratorRuntime is not defined
at getCliConfig (C:\mobileApp\one\node_modules\react-native\local-cli\core\index.js:128:64)
at Object. (C:\mobileApp\one\node_modules\react-native\local-cli\core\index.js:181:30)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Module._compile (C:\mobileApp\one\node_modules\pirates\lib\index.js:83:24)
at Module._extensions…js (internal/modules/cjs/loader.js:699:10)
at Object.newLoader [as .js] (C:\mobileApp\one\node_modules\pirates\lib\index.js:88:7)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Module.require (internal/modules/cjs/loader.js:636:17)
PS C:\mobileApp\one>

please help

1 Like

Hey @xuser,

To eject from an expo project, you should run expo eject and then after the ejecting process is complete. You still should start your project with expo start to start serving your JS bundle and then fire up your project with Android Studio.

Cheers,

Adam

that also doesnt work. besides the entire point of ejecting to project is to run the code on native mobile and not through the expo app. this is how one uploads it to the app store if im not mistaken.

i follow the instructions

npm install -g expo-cli
expo init my-app
cd my-app/
expo eject
npm run android

then error: ReferenceError: regeneratorRuntime is not defined

can anyone please help with this?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.