React Native npm fresh install EISDIR非法操作

时间:2016-10-04 16:21:07

标签: npm react-native bower

我已经在我的MacBook Pro 13"上进行了全新安装。 2014年中期(Sierra Update)。 安装BOWER,NPN和React Native后(按照官方指南https://facebook.github.io/react-native/docs/getting-started.html中的步骤),我创建并正确运行了测试项目。

现在我正在尝试处理我的项目(完全适用于其他mac)但是当我尝试使用npm -install从NPM获取引用时,我得到了这个错误。

npm install     错误的ERR! addLocal无法安装/ Users / diegobanovaz / Projects     错误的ERR!达尔文16.0.0     错误的ERR! argv" /usr/local/Cellar/node/6.7.0/bin/node" "在/ usr / local / bin中/ NPM" "安装"     错误的ERR!节点v6.7.0     错误的ERR! npm v3.10.8     错误的ERR!代码EISDIR     错误的ERR! errno -21     错误的ERR!系统调用阅读

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!     /Users/diegobanovaz/Projects/situa/npm-debug.log

这是.log内容

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/6.7.0/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'install' ]
2 info using npm@3.10.8
3 info using node@v6.7.0
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly install normalizeTree
8 silly loadCurrentTree Finishing
9 silly loadIdealTree Starting
10 silly install loadIdealTree
11 silly cloneCurrentTree Starting
12 silly install cloneCurrentTreeToIdealTree
13 silly cloneCurrentTree Finishing
14 silly loadShrinkwrap Starting
15 silly install loadShrinkwrap
16 silly loadShrinkwrap Finishing
17 silly loadAllDepsIntoIdealTree Starting
18 silly install loadAllDepsIntoIdealTree
19 silly fetchOtherPackageData react-native-navigation@file:../
20 silly cache add args [ 'react-native-navigation@file:../', null ]
21 verbose cache add spec react-native-navigation@file:../
22 silly cache add parsed spec Result {
22 silly cache add   raw: 'react-native-navigation@file:../',
22 silly cache add   scope: null,
22 silly cache add   escapedName: 'react-native-navigation',
22 silly cache add   name: 'react-native-navigation',
22 silly cache add   rawSpec: 'file:../',
22 silly cache add   spec: '/Users/diegobanovaz/Projects',
22 silly cache add   type: 'local' }
23 error addLocal Could not install /Users/diegobanovaz/Projects
24 silly fetchPackageMetaData Error: EISDIR: illegal operation on a     directory, read
24 silly fetchPackageMetaData     at Error (native)
24 silly fetchPackageMetaData  error for react-native-navigation@file:../ { Error: EISDIR: illegal operation on a directory, read
24 silly fetchPackageMetaData     at Error (native) errno: -21, code: 'EISDIR', syscall: 'read' }
25 silly rollbackFailedOptional Starting
26 silly rollbackFailedOptional Finishing
27 silly runTopLevelLifecycles Finishing
28 silly install printInstalled
29 verbose stack Error: EISDIR: illegal operation on a directory, read
29 verbose stack     at Error (native)
30 verbose cwd /Users/diegobanovaz/Projects/situa
31 error Darwin 16.0.0
32 error argv "/usr/local/Cellar/node/6.7.0/bin/node" "/usr/local/bin/npm" "install"
33 error node v6.7.0
34 error npm  v3.10.8
35 error code EISDIR
36 error errno -21
37 error syscall read
38 error eisdir EISDIR: illegal operation on a directory, read
39 error eisdir This is most likely not a problem with npm itself
39 error eisdir and is related to npm not being able to find a package.json in
39 error eisdir a package you are trying to install.
40 verbose exit [ -21, true ]

1 个答案:

答案 0 :(得分:0)

事实证明我的package.json存在问题。

为了找到它我用过:

http://package-json-validator.com/

告诉我哪里有问题。