使用npm install -g expo-cli安装React Native Expo时出现问题

特卖

我能够安装和运行react-native

但是当我尝试安装react native expo时出现了一些错误

这是我的Expo安装npm install -g expo-cli

Microsoft Windows [Version 10.0.16299.125]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\admin>npm uninstall -g expo-cli
up to date in 0.043s

C:\Users\admin>npm install -g expo-cli
npm WARN deprecated [email protected]: 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 [email protected]: One of your dependencies needs to upgrade to fsevents v2: 1) Proper nodejs v10+ support 2) No more fetching binaries from AWS, smaller package size
npm WARN deprecated [email protected]: 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 [email protected]: 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 [email protected]: 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 [email protected]: This module has moved and is now available at @hapi/topo. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated [email protected]: 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/[email protected] preinstall C:\Users\admin\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\admin\AppData\Roaming\npm\expo-cli -> C:\Users\admin\AppData\Roaming\npm\node_modules\expo-cli\bin\expo.js
C:\Users\admin\AppData\Roaming\npm\expo -> C:\Users\admin\AppData\Roaming\npm\node_modules\expo-cli\bin\expo.js

> [email protected] install C:\Users\admin\AppData\Roaming\npm\node_modules\expo-cli\node_modules\iltorb
> node ./scripts/install.js || node-gyp rebuild

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

> [email protected] install C:\Users\admin\AppData\Roaming\npm\node_modules\expo-cli\node_modules\libxmljs
> node-pre-gyp install --fallback-to-build --loglevel http

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp http GET https://github.com/libxmljs/libxmljs/releases/download/v0.19.7/node-v72-win32-x64.tar.gz
node-pre-gyp http 404 https://github.com/libxmljs/libxmljs/releases/download/v0.19.7/node-v72-win32-x64.tar.gz
node-pre-gyp WARN Tried to download(404): https://github.com/libxmljs/libxmljs/releases/download/v0.19.7/node-v72-win32-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://github.com/libxmljs/libxmljs/releases/download/v0.19.7/node-v72-win32-x64.tar.gz
gyp ERR! find Python
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python checking if "python2" can be used
gyp ERR! find Python - "python2" is not in PATH or produced an error
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python checking if the py launcher can be used to find Python 2
gyp ERR! find Python - "py.exe" is not in PATH or produced an error
gyp ERR! find Python checking if Python is C:\Python27\python.exe
gyp ERR! find Python - "C:\Python27\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Python37\python.exe
gyp ERR! find Python - "C:\Python37\python.exe" could not be run
gyp ERR! find Python
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"
gyp ERR! find Python   (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python   npm config set python "C:\Path\To\python.exe"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack     at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47)
gyp ERR! stack     at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16)
gyp ERR! stack     at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16)
gyp ERR! stack     at exithandler (child_process.js:302:5)
gyp ERR! stack     at ChildProcess.errorhandler (child_process.js:314:5)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
gyp ERR! stack     at onErrorNT (internal/child_process.js:456:16)
gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:80:21)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--loglevel=http" "--module=C:\\Users\\admin\\AppData\\Roaming\\npm\\node_modules\\expo-cli\\node_modules\\libxmljs\\build\\Release\\xmljs.node" "--module_name=xmljs" "--module_path=C:\\Users\\admin\\AppData\\Roaming\\npm\\node_modules\\expo-cli\\node_modules\\libxmljs\\build\\Release" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd C:\Users\admin\AppData\Roaming\npm\node_modules\expo-cli\node_modules\libxmljs
gyp ERR! node -v v12.13.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --loglevel=http --module=C:\Users\admin\AppData\Roaming\npm\node_modules\expo-cli\node_modules\libxmljs\build\Release\xmljs.node --module_name=xmljs --module_path=C:\Users\admin\AppData\Roaming\npm\node_modules\expo-cli\node_modules\libxmljs\build\Release --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\admin\AppData\Roaming\npm\node_modules\expo-cli\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Windows_NT 10.0.16299
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\admin\\AppData\\Roaming\\npm\\node_modules\\expo-cli\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "--loglevel" "http"
node-pre-gyp ERR! cwd C:\Users\admin\AppData\Roaming\npm\node_modules\expo-cli\node_modules\libxmljs
node-pre-gyp ERR! node -v v12.13.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --loglevel=http --module=C:\Users\admin\AppData\Roaming\npm\node_modules\expo-cli\node_modules\libxmljs\build\Release\xmljs.node --module_name=xmljs --module_path=C:\Users\admin\AppData\Roaming\npm\node_modules\expo-cli\node_modules\libxmljs\build\Release --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/[email protected] (node_modules\expo-cli\node_modules\@expo\ngrok-bin-darwin-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/[email protected]: wanted {"os":"darwin","arch":"ia32"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/[email protected] (node_modules\expo-cli\node_modules\@expo\ngrok-bin-freebsd-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/[email protected]: wanted {"os":"freebsd","arch":"ia32"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/[email protected] (node_modules\expo-cli\node_modules\@expo\ngrok-bin-darwin-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/[email protected]: wanted {"os":"darwin","arch":"x64"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/[email protected] (node_modules\expo-cli\node_modules\@expo\ngrok-bin-linux-arm):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/[email protected]: wanted {"os":"linux","arch":"arm"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/[email protected] (node_modules\expo-cli\node_modules\@expo\ngrok-bin-freebsd-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/[email protected]: wanted {"os":"freebsd","arch":"x64"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/[email protected] (node_modules\expo-cli\node_modules\@expo\ngrok-bin-linux-arm64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/[email protected]: wanted {"os":"linux","arch":"arm64"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/[email protected] (node_modules\expo-cli\node_modules\@expo\traveling-fastlane-darwin):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/[email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\expo-cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/[email protected] (node_modules\expo-cli\node_modules\@expo\ngrok-bin-win32-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/[email protected]: wanted {"os":"win32","arch":"ia32"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/[email protected] (node_modules\expo-cli\node_modules\@expo\ngrok-bin-sunos-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/[email protected]: wanted {"os":"sunos","arch":"x64"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/[email protected] (node_modules\expo-cli\node_modules\@expo\ngrok-bin-linux-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/[email protected]: wanted {"os":"linux","arch":"x64"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @expo/[email protected] (node_modules\expo-cli\node_modules\@expo\ngrok-bin-linux-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @expo/[email protected]: wanted {"os":"linux","arch":"ia32"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build --loglevel http`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\admin\AppData\Roaming\npm-cache\_logs\2019-11-15T12_28_16_679Z-debug.log

C:\Users\admin>npm WARN deprecated [email protected]: 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).hapi.im

Usage: npm <command>

where <command> is one of:
    access, adduser, audit, bin, bugs, c, cache, ci, cit,
    clean-install, clean-install-test, completion, config,
    create, ddp, dedupe, deprecate, dist-tag, docs, doctor,
    edit, explore, get, help, help-search, hook, i, init,
    install, install-ci-test, install-test, it, link, list, ln,
    login, logout, ls, org, outdated, owner, pack, ping, prefix,
    profile, prune, publish, rb, rebuild, repo, restart, root,
    run, run-script, s, se, search, set, shrinkwrap, star,
    stars, start, stop, t, team, test, token, tst, un,
    uninstall, unpublish, unstar, up, update, v, version, view,
    whoami

npm <command> -h  quick help on <command>
npm -l            display full usage info
npm help <term>   search for help on <term>
npm help npm      involved overview

Specify configs in the ini-formatted file:
    C:\Users\admin\.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

[email protected] C:\Program Files\nodejs\node_modules\npm


C:\Users\admin>

这就是我尝试创建博览会应用程序时得到的

C:\test>expo init expoprojext
internal/modules/cjs/loader.js:797
    throw err;
    ^

Error: Cannot find module 'C:\Users\admin\AppData\Roaming\npm\node_modules\expo-cli\bin\expo.js'
[90m    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)[39m
[90m    at Function.Module._load (internal/modules/cjs/loader.js:687:27)[39m
[90m    at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)[39m
[90m    at internal/main/run_main_module.js:17:11[39m {
  code: [32m'MODULE_NOT_FOUND'[39m,
  requireStack: []
}

C:\test>

您能帮我这个吗########################################### ############################################### ############

Keremcan Buyuktaskin

今天,我试图更新我的expo-cli并得到同样的错误。因此,我再次安装了旧版本。您可以尝试一下,它对我有用。

npm i -g [email protected]

编辑:现在,Expo-CLI Github页面上有一个错误报告,建议有人运行npm install --global --production windows-build-tools然后安装最新版本的Expo。此npm软件包将安装Visual C ++ Build Tools和Python 2.7。如果您想要最新版本的Expo,可以尝试一下。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

从expo弹出到expoKit / pure React Native

来自分类Dev

为什么使用EXPO成功构建后无法安装React Native应用程序?

来自分类Dev

我应该使用Expo作为Expo音频库还是React-native-track-player?

来自分类Dev

无法运行npm install -g expo-cli

来自分类Dev

安装Expo CLI时出现无限循环

来自分类Dev

在React Native中使用npm install安装节点模块时出错

来自分类Dev

在React Native EXPO应用程序中使用Formik时出错

来自分类Dev

如何在React native中加密数据(使用Expo)

来自分类Dev

无法使用npm install -g安装turtle-cli

来自分类Dev

如何使用Expo Web(React Native Web)进行拆分编码?

来自分类Dev

不推荐使用的API用法Expo React Native

来自分类Dev

更新React Native之后安装Pod时出现问题

来自分类Dev

如何使用expo集成react-native-tab-view?

来自分类Dev

使用Expo React Native(Android)收听FCM推送通知传递

来自分类Dev

如何在React Native Expo中使用按钮发送通知

来自分类Dev

使用expo和@ react-native-community / async-storage

来自分类Dev

使用react-native-cli或expo-cli的移动应用程序?

来自分类Dev

安装g ++时出现问题

来自分类Dev

使用$ sudo npm install -g mean-cli时出错

来自分类Dev

在 Python 3.6.1 上启动使用 pip install 安装的 spyder 时出现问题

来自分类Dev

将在 React Native 中使用 Expo 最差吗?

来自分类Dev

无法处理“npm install -g create-react-native-app”

来自分类Dev

使用 expo 发布 React Native 应用程序

来自分类Dev

关于不使用 EXPO 的纯 React Native 的任何文档?

来自分类Dev

React Native 广告 (Adcolony) - Expo

来自分类Dev

无法使用 expo 构建项目(react native 和 node)

来自分类Dev

如何在 React-Native 或 Expo 的 fetch 中使用 headers

来自分类Dev

React-Native Expo & loadassetasync()

来自分类Dev

npm install -g react-native-cli - 显示错误

Related 相关文章

  1. 1

    从expo弹出到expoKit / pure React Native

  2. 2

    为什么使用EXPO成功构建后无法安装React Native应用程序?

  3. 3

    我应该使用Expo作为Expo音频库还是React-native-track-player?

  4. 4

    无法运行npm install -g expo-cli

  5. 5

    安装Expo CLI时出现无限循环

  6. 6

    在React Native中使用npm install安装节点模块时出错

  7. 7

    在React Native EXPO应用程序中使用Formik时出错

  8. 8

    如何在React native中加密数据(使用Expo)

  9. 9

    无法使用npm install -g安装turtle-cli

  10. 10

    如何使用Expo Web(React Native Web)进行拆分编码?

  11. 11

    不推荐使用的API用法Expo React Native

  12. 12

    更新React Native之后安装Pod时出现问题

  13. 13

    如何使用expo集成react-native-tab-view?

  14. 14

    使用Expo React Native(Android)收听FCM推送通知传递

  15. 15

    如何在React Native Expo中使用按钮发送通知

  16. 16

    使用expo和@ react-native-community / async-storage

  17. 17

    使用react-native-cli或expo-cli的移动应用程序?

  18. 18

    安装g ++时出现问题

  19. 19

    使用$ sudo npm install -g mean-cli时出错

  20. 20

    在 Python 3.6.1 上启动使用 pip install 安装的 spyder 时出现问题

  21. 21

    将在 React Native 中使用 Expo 最差吗?

  22. 22

    无法处理“npm install -g create-react-native-app”

  23. 23

    使用 expo 发布 React Native 应用程序

  24. 24

    关于不使用 EXPO 的纯 React Native 的任何文档?

  25. 25

    React Native 广告 (Adcolony) - Expo

  26. 26

    无法使用 expo 构建项目(react native 和 node)

  27. 27

    如何在 React-Native 或 Expo 的 fetch 中使用 headers

  28. 28

    React-Native Expo & loadassetasync()

  29. 29

    npm install -g react-native-cli - 显示错误

热门标签

归档