I’ve brand new to react, react native, and to expo, so I apologize if I missed something. I’ve been very carefully going through these steps Setting up the development environment · React Native to setup and create my first project. I installed npm (version 6.14.4), I’m using a mac (Catalina 10.15.4). Not sure what else you need to know. I’m getting this error when trying to init a new project.
% expo init TestApp1
Must use import to load ES Module: /usr/local/lib/node_modules/expo-cli/node_modules/is-promise/index.js
require() of ES modules is not supported.
require() of /usr/local/lib/node_modules/expo-cli/node_modules/is-promise/index.js from /usr/local/lib/node_modules/expo-cli/node_modules/run-async/index.js is an ES module file as it is a .js file whose nearest parent package.json contains “type”: “module” which defines all .js files in that package scope as ES modules.
Instead rename /usr/local/lib/node_modules/expo-cli/node_modules/is-promise/index.js to end in .cjs, change the requiring code to use import(), or remove “type”: “module” from /usr/local/lib/node_modules/expo-cli/node_modules/is-promise/package.json.
Set EXPO_DEBUG=true in your env to view the stack trace.
I turned on the EXPO_DEBUG and got this stack trace:
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1172:13)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Module.require (internal/modules/cjs/loader.js:1042:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object. (/usr/local/lib/node_modules/expo-cli/node_modules/run-async/index.js:3:17)
at Module._compile (internal/modules/cjs/loader.js:1156:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1176:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)