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.

How do I fix this issue node_modules/expo/AppEntry.js: [BABEL] ?

See original GitHub issue

#node_modules/expo/AppEntry.js: [BABEL]

I already installed all the dependencies for my project, and I’m getting this issue, and I’m not sure how to solve it.

#package.json - Main

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "babel": "^6.23.0",
    "expo": "~39.0.2",
    "expo-status-bar": "~1.0.2",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "https://github.com/expo/react-native/archive/sdk-39.0.4.tar.gz",
    "react-native-dotenv": "^2.4.2",
    "react-native-web": "~0.13.12"
  },
  "devDependencies": {
    "@babel/core": "~7.9.0",
    "babel-plugin-module-resolver": "^4.0.0"
  },
  "private": true,
  "name": "my-project"
}

babel.config.js

module.exports = function (api) {
  api.cache(true);
  return {
    presets: ["babel-preset-expo", "module:react-native-dotenv"],
  };
};

My github repository is the following:

https://github.com/hvaandres/WeatherApp_React

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
pierregambaudcommented, Nov 14, 2022

Adding the following to my package.json solved my “api.addExternalDependency is not a function” error:

"resolutions": {
  "@babel/core": "^7.20.2",
  "babel-loader": "8.3.0"
}

_Source: https://dev.to/goatandsheep/how-to-use-babels-new-addexternaldependency-api-338h_

2reactions
hvaandrescommented, Nov 9, 2020

I just used this documentation https://docs.expo.io/. I ran the following commands: npm install --global expo-cli expo init my-project This includes the version of my previous version of Babel. I didn’t do anything different. You will have to look at NPM website since they Published/Updated a new version 18 days ago for react-native-dotenv. This is why I submitted a ticket since I’m just using current and existing documentation. You are right, I should use a more polite word, but sometimes we have to learn how to take criticism without getting offended. I went to design school and I’m used to receiving bad and good criticism.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I fix this issue: "node_modules/expo/AppEntry.js
node_modules \react-native-dotenv\index.js. They were using Node standard library module "fs" , so I replaced it with react-native-fs package ...
Read more >
babel-preset-expo - npm
Start using babel-preset-expo in your project by running `npm i babel-preset-expo`. There are 55 other projects in the npm registry using ...
Read more >
unable to resolve module expo-constants - error react native
I ended up using 'rn-nodeify' to include fs into React Native. You can use most of the node core modules this method. Install...
Read more >
Expo SDK
Now i cannot run the project on the emulator. I have so far removed node_modules and re-installed, removed the app from the emulator...
Read more >
Cannot find module babel-plugin-r. Need help with error - Reddit
Have cleared cached, reset, reinstalled npm modules, but… ... The issue for me was in babel.config.js specifically with the ...
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