I have node.js of version 18.18.0
on machine before and my react-native app was working just fine. But I recently installed lower version of node.js 14.0.0
using nvm
and When I start my expo react-native app with npm start
I got the below error:
> [email protected] start
> expo start
SyntaxError: Unexpected token '='
C:UsersAbdulmujeebGlopilots-Vendornode_modules@expoconfigbuildConfig.js:476
exp ??= getConfig(projectRoot, {
^
SyntaxError: Unexpected token '='
at wrapSafe (internal/modules/cjs/loader.js:1101:16)
at Module._compile (internal/modules/cjs/loader.js:1149:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10)
at Module.load (internal/modules/cjs/loader.js:1034:32)
at Function.Module._load (internal/modules/cjs/loader.js:923:14)
at Module.require (internal/modules/cjs/loader.js:1074:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (C:UsersAbdulmujeebGlopilots-Vendornode_modules@expoconfigbuildindex.js:15:15)
at Module._compile (internal/modules/cjs/loader.js:1185:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10)
I have tried multiple solutions like:
-
Uninstalled my
nvm
and node version14.0.0
-
reinstalling the node modules:
rm -rf node_modules rm package-lock.json npm install ```
-
Clearing the npm cache
npm install -g expo-cli
None of these work, help me out
New contributor
Ay_tech is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.