I cannot run the app, just throw an error: node_modules/expo/AppEntry.js: Unexpected token ‘.’, but I try to find in the AppEntry.js and don’t have any unexpected
I get somewhat the same issue any how the error appears after trying to run either npm i -g expo-cli or npx expo-cli -h. And the project has not been set-up yet.
That doesn’t really make sense. The title of this post implies that the error happens when trying to start the app. Presumably with something like npx expo start.
npm i -g expo-cli and npx expo-cli -h do not start the app. They don’t have anything to do with any particular Expo app.
Can you please copy and past from the console showing the command you are running and the error you’re getting? Or screenshots? Also, what version of the Expo SDK are you using? The OP was using Expo SDK 41 which is pretty old now.
Sure, I found out that basically I had to downgrade the node version for Windows.
This is what I was trying:
PS C:\Users\myuser\Documents\GitHub> npm install -g expo-cli
npm ERR! Unexpected token '.'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\myuser\AppData\Local\npm-cache\_logs\2023-05-30T21_29_50_254Z-debug-0.log