Upgrade to SDK 32 gives error "regeneratorRuntime is not defined"

After following the instructions to upgrade to SDK 32, the CLI’s start command gives the following error

/Users/me/code/myrepo/mobile-app/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 (/Users/shane/code/ts-cloud-functions/mobile-app/node_modules/react-native/local-cli/core/index.js:128:64)
    at Object.<anonymous> (/Users/shane/code/ts-cloud-functions/mobile-app/node_modules/react-native/local-cli/core/index.js:181:30)
    at Module._compile (module.js:649:30)
    at Module._compile (/Users/shane/code/ts-cloud-functions/mobile-app/node_modules/pirates/lib/index.js:99:24)
    at Module._extensions..js (module.js:660:10)
    at Object.newLoader [as .js] (/Users/shane/code/ts-cloud-functions/mobile-app/node_modules/pirates/lib/index.js:104:7)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:501:12)
    at Function.Module._load (module.js:493:3)
    at Module.require (module.js:593:17)

Metro Bundler process exited with code 1

I tried deleting most items from package.json, thinking it’s some 3rd party package clashing, but it didn’t help.

Node 9.10.0

Any thoughts?

Hey @promiseapp,

As described here: https://docs.expo.io/versions/v32.0.0/introduction/installation/#local-development-tool-expo-cli, can you try upgrading to a Node 10+ version?

Cheers,
Adam

Thanks @adamjnav. I switched to Node v10.15.3, deleted node_modules, upgraded to the latest Expo CLI version 2.15.4, ran yarn again to install node_modules, and then expo start -c and still get the same error

Interesting. Thanks for trying that! Can you see if you encounter the same issue when creating a new project with expo init?

No, creating a new project works fine

When you upgraded, did you incrementally do so (by following the blog post instructions for each upgrade) or did you hop from X → 32?

I hopped from 30 to 32

I’ll retry, going one by one

You could also just look at 30 → 31 steps and make sure you didn’t miss any breaking changes.

I moved to v31 and it worked fine. I’ll hold off on 32 for now since we’re unblocked, hopefully it’ll be easier in a few months when I come back to it. Thanks for the help

Hmmm. Glad you’re unblocked but I’d take a look at your babel config as that error pertains to babel. SDK31 introduced support for Babel 7.

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