2

Hi React native masters, I am trying to create react native app using expo cli.

1-I installed expo globally by: npm install -g expo-cli

2-Then I checked the version: expo --version It showed :6.13.1

3-Then I tried to initiate the app by: expo init myApp and it gives me this error:

internal/modules/cjs/loader.js:964
    throw err;
    ^

Error: Cannot find module 'semver'
Require stack:
- C:\Users\Faizan\AppData\Roaming\npm\node_modules\expo-cli\bin\expo.js
[90m    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:961:17)[39m
[90m    at Function.Module._load (internal/modules/cjs/loader.js:854:27)[39m
[90m    at Module.require (internal/modules/cjs/loader.js:1023:19)[39m
[90m    at require (internal/modules/cjs/helpers.js:72:18)[39m
    at Object.<anonymous> (C:\Users\Faizan\AppData\Roaming\npm\node_modules\[4mexpo-cli[24m\bin\expo.js:4:14)
[90m    at Module._compile (internal/modules/cjs/loader.js:1128:30)[39m
[90m    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)[39m
[90m    at Module.load (internal/modules/cjs/loader.js:983:32)[39m
[90m    at Function.Module._load (internal/modules/cjs/loader.js:891:14)[39m
[90m    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)[39m {
  code: [32m'MODULE_NOT_FOUND'[39m,
  requireStack: [
    [32m'C:\\Users\\Faizan\\AppData\\Roaming\\npm\\node_modules\\expo-cli\\bin\\expo.js'[39m
  ]
}

Please help me out in this, Thanks!

Faizan Butt
  • 43
  • 1
  • 7
  • try deleting your node_modules folder and running npm install or yarn install again – Atin Singh Dec 07 '19 at 10:04
  • Thanks Atin for you reply, It solved the issue. – Faizan Butt Dec 07 '19 at 10:38
  • Now I run "expo init amazingApp" then selected blank and got this: ? Choose a template: expo-template-blank request to https://registry.npmjs.org/expo-template-blank failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org Set EXPO_DEBUG=true in your env to view the stack trace. – Faizan Butt Dec 07 '19 at 10:40
  • sorry for late reply. You can check this Post here for more details https://stackoverflow.com/questions/39592908/error-getaddrinfo-enotfound-registry-npmjs-org-registry-npmjs-org443 – Atin Singh Dec 08 '19 at 05:25

2 Answers2

1
npm install -g expo-cli --force

try this it's work for me

0

I am pleased to announce the solution to my challenge. I actually used it in powershell and got expo-cli installed globally in my machine npm install --global expo-cli