Не могу установить expo-cli, выдает ошибки и отнимает слишком много времени - PullRequest
0 голосов
/ 17 июня 2019

Я пробовал это с обеими пряжами и npm, но expo-cli просто не смог установить, Возникла ошибка при включении wsl.Я просто не знаю, зачем это нужно и что это такое.Почему он просто не может работать только на Windows?

npm install expo-cli --global

Пытался установить expo-cli по npm, но он показывает несколько ошибок.Я опубликовал все свои результаты cmd ниже, чтобы я мог узнать, в чем здесь была проблема.

  npm WARN deprecated joi@11.4.0: This version has been deprecated in 
  accordance with the hapi support policy (hapi.im/support). Please 
  upgrade to the latest version to get the best features, bug fixes, and 
  security patches. If you are unable to upgrade at this time, paid 
  support is available for older versions (hapi.im/commercial).

  npm WARN deprecated topo@2.0.2: This version has been deprecated in 
  accordance with the hapi support policy (hapi.im/support). Please 
  upgrade to the latest version to get the best features, bug fixes, and 
  security patches. If you are unable to upgrade at this time, paid 
  support is available for older versions (hapi.im/commercial).

 npm WARN deprecated hoek@4.2.1: This version has been deprecated in 
 accordance with the hapi support policy (hapi.im/support). Please upgrade 
 to the latest version to get the best features, bug fixes, and security 
 patches. If you are unable to upgrade at this time, paid support is 
 available for older versions (hapi.im/commercial).

npm WARN deprecated hoek@6.1.3: This module has moved and is now available 
at @hapi/hoek. Please update your dependencies as this version is no
longer maintained an may contain bugs and security issues.

 > @expo/traveling-fastlane-linux@1.9.4 preinstall 
 C:\Users\HP\AppData\Roaming\npm\node_modules\expo- 
 cli\node_modules\@expo\traveling-fastlane-linux
 > node platform.js

Does not seem like WSL enabled on this machine. Download a Linux distro 
from the Windows Store, run it at least onceand then make sure to run in 
an admin powershell:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows- 
Subsystem-Linux

C:\Users\HP\AppData\Roaming\npm\expo ->   
C:\Users\HP\AppData\Roaming\npm\node_modules\expo-cli\bin\expo.js
C:\Users\HP\AppData\Roaming\npm\expo-cli -> 
C:\Users\HP\AppData\Roaming\npm\node_modules\expo-cli\bin\expo.js

> iltorb@2.4.3 install C:\Users\HP\AppData\Roaming\npm\node_modules\expo- 
cli\node_modules\iltorb
> node ./scripts/install.js || node-gyp rebuild

info looking for cached prebuild @ C:\Users\HP\AppData\Roaming\npm- 
cache\_prebuilds\c677a8-iltorb-v2.4.3-node-v64-win32-x64.tar.gz
info found cached prebuild
info unpacking @ C:\Users\HP\AppData\Roaming\npm-cache\_prebuilds\c677a8- 
iltorb-v2.4.3-node-v64-win32-x64.tar.gz
info unpack resolved to C:\Users\HP\AppData\Roaming\npm\node_modules\expo- 
cli\node_modules\iltorb\build\bindings\iltorb.node
info unpack required C:\Users\HP\AppData\Roaming\npm\node_modules\expo- 
cli\node_modules\iltorb\build\bindings\iltorb.node successfully 
info install Successfully installed iltorb binary!

> sharp@0.22.1 install C:\Users\HP\AppData\Roaming\npm\node_modules\expo- 
cli\node_modules\sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || 
(node-gyp rebuild && node install/dll-copy)

info sharp Using cached C:\Users\HP\AppData\Roaming\npm- 
cache\_libvips\libvips-8.7.4-win32-x64.tar.gz
ERR! sharp Please delete C:\Users\HP\AppData\Roaming\npm- 
cache\_libvips\libvips-8.7.4-win32-x64.tar.gz as it is not a valid tarball
ERR! sharp zlib: unexpected end of file
info sharp Attempting to build from source via node-gyp but this may fail 
due to the above error
info sharp Please see https://sharp.pixelplumbing.com/page/install for 
required dependencies

C:\Users\HP\AppData\Roaming\npm\node_modules\expo- 
cli\node_modules\sharp>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
 gyp ERR! configure error
gyp ERR! stack Error: Command failed: 
C:\Users\HP\AppData\Local\Programs\Python\Python37-32\python.EXE -c import 
sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                                ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:294:12)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:970:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit 
(internal/child_process.js:259:5)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program 
Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node- 
gyp.js" "rebuild"
gyp ERR! cwd C:\Users\HP\AppData\Roaming\npm\node_modules\expo- 
cli\node_modules\sharp
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...