React Native无法安装

时间:2016-04-12 01:32:16

标签: android node.js react-native

我正在尝试在Android上运行React Native示例,位于:https://github.com/brentvatne/react-native-scrollable-tab-view

遵循以下步骤:

  1. cd ... \ react-native-scrollable-tab-view-master \ examples \ FacebookTabsExample
  2. npm install ---失败
  3. 此步骤的错误是:

    C:\Users\KJA\ReactNativeProjects\FacebookTabsExample>npm install
    npm ERR! addLocal Could not install C:\Users\KJA
    npm ERR! Windows_NT 6.1.7601
    npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
    node_modules\\npm\\bin\\npm-cli.js" "install"
    npm ERR! node v5.7.0
    npm ERR! npm  v3.6.0
    npm ERR! code EISDIR
    npm ERR! errno -4068
    npm ERR! syscall read
    
    npm ERR! eisdir EISDIR: illegal operation on a directory, read
    npm ERR! eisdir This is most likely not a problem with npm itself
    npm ERR! eisdir and is related to npm not being able to find a package.json in
    npm ERR! eisdir a package you are trying to install.
    
    npm ERR! Please include the following file with any support request:
    npm ERR!     C:\Users\KJA\ReactNativeProjects\FacebookTabsExample\npm-debug.log
    

    我找不到为什么会这样?怎么能减轻这种情况?

1 个答案:

答案 0 :(得分:0)

在尝试使用此模块之前,请确保先在全局安装了以下模块

反应

npm install react -g

反应天然

npm install react-native -g

然后尝试再次运行该命令。