You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I run react-native run-android in cmd, after changing path to the project folder, but it shows the following error:
import type {CommandT} from './commands';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at wrapSafe (internal/modules/cjs/loader.js:1117:16)
at Module._compile (internal/modules/cjs/loader.js:1165:27)
at Module._compile (C:\Users\saran\react-native-airbnb-clone\node_modules\pirates\lib\index.js:91:24)
at Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
at Object.newLoader [as .js] (C:\Users\saran\react-native-airbnb-clone\node_modules\pirates\lib\index.js:96:7)
at Module.load (internal/modules/cjs/loader.js:1050:32)
at Function.Module._load (internal/modules/cjs/loader.js:938:14)
at Module.require (internal/modules/cjs/loader.js:1090:19)
at require (internal/modules/cjs/helpers.js:75:18)
at Object. (C:\Users\saran\react-native-airbnb-clone\node_modules\react-native\local-cli\cli.js:21:16)
The text was updated successfully, but these errors were encountered:
Well, I solved this error after some time.
It seemed that a I didn't have a lot of dependencies installed. So, in order to save your time, stop installing them manually, and just run 'npm audit fix'. (or you could use with --force)
This will fix all dependencies, and your app should run after this.
I run react-native run-android in cmd, after changing path to the project folder, but it shows the following error:
import type {CommandT} from './commands';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at wrapSafe (internal/modules/cjs/loader.js:1117:16)
at Module._compile (internal/modules/cjs/loader.js:1165:27)
at Module._compile (C:\Users\saran\react-native-airbnb-clone\node_modules\pirates\lib\index.js:91:24)
at Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
at Object.newLoader [as .js] (C:\Users\saran\react-native-airbnb-clone\node_modules\pirates\lib\index.js:96:7)
at Module.load (internal/modules/cjs/loader.js:1050:32)
at Function.Module._load (internal/modules/cjs/loader.js:938:14)
at Module.require (internal/modules/cjs/loader.js:1090:19)
at require (internal/modules/cjs/helpers.js:75:18)
at Object. (C:\Users\saran\react-native-airbnb-clone\node_modules\react-native\local-cli\cli.js:21:16)
The text was updated successfully, but these errors were encountered: