1

描述

我试图启动一个示例项目

$ npm install -g create-react-native-app sample-app

它抛出这个错误:

$ npm install -g create-react-native-app sample-app
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t git://github.scm.corp.ebay.com/cubejs-ebay/ebay-global-header-node.git
npm ERR! 
npm ERR! 
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/gen/.npm/_logs/2018-02-02T13_01_50_144Z-debug.log

比我运行那个孤立的命令:

/usr/bin/git ls-remote -h -t git://github.scm.corp.ebay.com/cubejs-ebay/ebay-global-header-node.git

并引发此错误:

fatal: unable to connect to github.scm.corp.ebay.com:
github.scm.corp.ebay.com: Name or service not known

我也在远程服务器上做了,以确保它不是网络问题

环境

  • npm ls react-native-scripts

    /var/www └──(空)

  • npm ls react-native

    /var/www └──(空)

  • npm ls expo

    /var/www └──(空)

  • node -v

    /var/www └──(空)

  • npm -v: v8.9.4

  • yarn --version: 1.3.2
  • watchman version: 守望者: 找不到命令

    1. 操作系统:Linux SPDEV1 4.13.0-26-generic #29~16.04.2-Ubuntu SMP Tue Jan 9 22:00:44 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
4

2 回答 2

3

尝试运行$ npm install -g create-react-native-app

之后$ create-react-native-app sample-app

也许是因为您试图在一行中执行这两个命令。

于 2018-02-02T16:59:14.100 回答
0

我遇到了同样的问题,根据 Mateo 的建议,我尝试了如下命令。

$ npm install -g create-react-app

$ create-react-app sample-app

刚刚删除了原生,不知道有什么区别。

于 2018-03-20T13:50:44.757 回答