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.

Can not start my project after updating to sdk31, can not read property one of undefined

See original GitHub issue

Updating to expo sdk 31, from sdk 30. exact error: PathToProject/node_modules/expo/AppEntry.js: Cannot read property ‘1’ of undefined

image Solution I tried* Tried going back to sdk 30, everything works again. Opened AppEntry File found below lines, I guess something wrong with keep awake.

import { KeepAwake, registerRootComponent } from 'expo';
import App from '../../App';

if (__DEV__) {
  KeepAwake.activate();
}

registerRootComponent(App);

if something is wrong with my babel settings, then please let me know, below are settings for bebel.

{
  "presets": ["babel-preset-expo"],
  "env": {
    "development": {
      "plugins": ["transform-react-jsx-source"]
    }
  }
}


also tried changing transform-react-jsx-source to @babel/transform-react-jsx-source

Issue Analytics

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

github_iconTop GitHub Comments

6reactions
shubhamdeolcommented, Nov 28, 2018

@mauriciord finally able to fix this with : yarn add babel-plugin-module-resolver@latest read here: https://forums.expo.io/t/babel-preset-expo-error-after-upgrading-to-v31/15523/3

1reaction
rdibonacommented, Feb 12, 2019

@Beissner

Sorry. I meant the error " Cannot read property ‘1’ of undefined". I think it’s related to Babel, I’ve tried just about everything. Any suggestions?

I updated to sdk32 and did the step above with deleting .babelrc and running npm i --save-dev babel-plugin-module-resolver@latest

I am now back in business.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read properties of undefined (reading 'map')
I had the same error and solved it by first asking if the array existed. Example: <Filter> { product.color?.map((c) => ( <FilterColor color ......
Read more >
Cannot Read Property Length of Undefined in JavaScript
The JavaScript TypeError: Cannot read property 'length' of undefined occurs when the length property is read on an undefined variable.
Read more >
ERROR TypeError: Cannot read property title of undefined
HEY, SET YOUR LIKE THERE !!! ------------------- ----- LIKE --- https://codedocu.com/Software/Angular/Angular-Error/Solv...
Read more >
Uncaught TypeError: Cannot read property '1' of undefined
This error occurs in Chrome Browser when you read a property or call a method on an undefined object . Uncaught TypeError: Cannot...
Read more >
Troubleshooting - Unity - Manual
This error message indicates that your manifest.json file is malformed. It also tells you the line number where the Package Manager failed to...
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