node_modules/expo/AppEntry.js: "" is not a valid identifer name

Please provide the following:

  1. SDK Version: 35.0.0
  2. Platforms(Android/iOS/web/all): all

I wanted to start a new project with expo. When I create a new project and want to run it there is always the error:
node_modules/expo/AppEntry.js: “” is not a valid identifer name

I tried to initialize the new project multiple times but this error keeps coming up. I didn’t do anything to the code and just followed the instructions the CLI gave me. (After initializing cd into the directory and then “npm start”)

Does anybody have an idea? Thank you for your help.

Fixed this problem:

  • I deleted node_modules
  • then: sudo npm install

It might have to do with missing admin-rights (missing ‘sudo’) when initializing. (I’m by far not an expert in this so just a guess.)

Hi

You should not need sudo for this. If you did it might imply that you used sudo when running expo init or npm install previously, so now some files/directories are owned by root.

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