cannot init expo project on Windows

Hello,

I’ve been trying to put expo up and running in Windows 10 64 bits but it does not init the project.
It says the packages are corrupted, then freezes and does not finish the task. Here’s the output:

C:\Users\luisr\expo>expo init
? Choose a project name: teste
? Choose a template: expo-template-tabs
[15:22:12] Extracting project files…
[15:22:21] Customizing project…
[15:22:22] Initialized a git repository.
[15:22:22] Installing dependencies…
npm WARN deprecated kleur@2.0.2: Please upgrade to kleur@3 or migrate to ‘ansi-colors’ if you prefer the old syntax. Visit https://github.com/lukeed/kleur/releases/tag/v3.0.0\ for migration path(s).
npm WARN tarball tarball data for react-native@https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz (sha512-+taJh7bN2owmwaZpJUrNpHdmPAL6ZynNCZj15uLQgjaPFq0ZBIG2ZWuSJ48eGoUjAb3lrWxkmLlHb2eJFXc7sQ==) seems to be corrupted. Trying one more time.
[ …] | extract: sill extract lottie-react-native@2.5.0 extracted to C:\Users\luisr\expo\teste\node_modu

These are the versions I´m running:

C:\Users\luisr\expo>expo -V
2.6.14

C:\Users\luisr\expo>npm -v
6.6.0

C:\Users\luisr\expo>node -v
v11.7.0

I don’t konw what to do… Can somebody please help me?

Hey @lrmcbr,

What shell are you running on Windows? I haven’t seen these warning messages lately. Did you by chance try upgrading your kleur version to see if that had any bearing?

Cheers,

Adam

I tried cmd, Powershell, cmd as administrator, powershell as administrator and nodejs command prompt.
None of them worked
I tried update kleur running

npm install -g kleur@latest

but when I run npm install at the project folder it says the same thing…

I belive problem is about dependencies… but when I run “npm install -g < package >@< version >” it returns that the package was installed. Then I try to run “npm install” at the project folder and it keeps saying that the dependencies were not found.

So I did this test

C:\Users\luisr\expo\teste>npm install -g react-native
npm WARN rm not removing C:\Users\luisr\AppData\Roaming\npm\react-native.cmd as it wasn’t installed by C:\Users\luisr\AppData\Roaming\npm\node_modules\react-native
npm WARN rm not removing C:\Users\luisr\AppData\Roaming\npm\react-native as it wasn’t installed by C:\Users\luisr\AppData\Roaming\npm\node_modules\react-native
C:\Users\luisr\AppData\Roaming\npm\react-native → C:\Users\luisr\AppData\Roaming\npm\node_modules\react-native\local-cli\wrong-react-native.js
npm WARN react-native@0.57.8 requires a peer of react@16.6.3 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\react-native\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})

  • react-native@0.57.8
    updated 1 package in 73.798s

C:\Users\luisr\expo\teste>npm install -g react

  • react@16.7.0
    updated 2 packages in 1.443s

C:\Users\luisr\expo\teste>npm install -g react@16.6.3

  • react@16.6.3
    updated 2 packages in 1.609s

C:\Users\luisr\expo\teste>npm install -g react-native
C:\Users\luisr\AppData\Roaming\npm\react-native → C:\Users\luisr\AppData\Roaming\npm\node_modules\react-native\local-cli\wrong-react-native.js
npm WARN react-native@0.57.8 requires a peer of react@16.6.3 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\react-native\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})

  • react-native@0.57.8
    updated 1 package in 35.417s

C:\Users\luisr\expo\teste>npm install -g react@16.6.3 react-native
C:\Users\luisr\AppData\Roaming\npm\react-native → C:\Users\luisr\AppData\Roaming\npm\node_modules\react-native\local-cli\wrong-react-native.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\react-native\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})

  • react@16.6.3
  • react-native@0.57.8
    updated 2 packages in 35.567s

C:\Users\luisr\expo\teste>

It seems to me that when I do “install -g package” it´s not installing a thing, since when I run “npm install -g react@16.6.3 react-native” in a single command, it installs ok…

but I could not do the same for “npm install”… after several tries, the list of packages was too long and still didn’t work.

C:\Users\luisr\expo\teste>npm install react@16.6.3 react-native expo-google-sign-in@2.0.0 react@16.0.0-alpha.6 create-react-context@0.2.2 react-native-gesture-handler@1.0.12 react-native-maps@0.22.1 react-native-reanimated@1.0.0-alpha.11 react-test-renderer@16.7.0 .
npm WARN react-native-maps@0.22.1 requires a peer of react@>= 16.0 || < 17.0 but none is installed. You must install peer dependencies yourself.
npm WARN expo-google-sign-in@2.0.0 requires a peer of react-native@^0.55.4 but none is installed. You must install peer dependencies yourself.
npm WARN create-react-context@0.2.2 requires a peer of react@^0.14.0 || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-reanimated@1.0.0-alpha.11 requires a peer of react-native@^0.44.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-maps@0.22.1 requires a peer of react@>= 16.0 || < 17.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-gesture-handler@1.0.12 requires a peer of react@> 15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-test-renderer@16.7.0 requires a peer of react@^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native@0.57.8 requires a peer of react@16.6.3 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})

  • expo-google-sign-in@2.0.0
  • create-react-context@0.2.2
  • react-native-reanimated@1.0.0-alpha.11
  • react-native-maps@0.22.1
  • react-native-gesture-handler@1.0.12
  • react-test-renderer@16.7.0
  • react@16.6.3
  • react@16.0.0-alpha.6
  • react-native@0.57.8
    added 1 package from 1 contributor, updated 8 packages, moved 1 package and audited 40835 packages in 133.155s
    found 0 vulnerabilities

Any ideas?

As I understand, most of the problems come from package.json, so maybe there is a manual how to fix those depencies, so we wouldn’t have those errors? I’m new to Expo and this is killing me. :expressionless:

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.