-4
npm錯誤,當我嘗試用Mac構建React Native環境時。sudo npm install -g react-native ERR!無法找到模塊'./spawn'
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli 'react-native' ]
2 info using [email protected]
3 info using [email protected]
4 verbose stack Error: Cannot find module './spawn'
4 verbose stack at Function.Module._resolveFilename (module.js:325:15)
4 verbose stack at Function.Module._load (module.js:276:25)
4 verbose stack at Module.require (module.js:353:17)
4 verbose stack at require (internal/module.js:12:17)
4 verbose stack at Object.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:6:13)
4 verbose stack at Module._compile (module.js:409:26)
4 verbose stack at Object.Module._extensions..js (module.js:416:10)
4 verbose stack at Module.load (module.js:343:32)
4 verbose stack at Function.Module._load (module.js:300:12)
4 verbose stack at Module.require (module.js:353:17)
4 verbose stack at require (internal/module.js:12:17)
5 verbose cwd /Users/BigGIfts
6 error Darwin 15.6.0
7 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "react-native"
8 error node v4.6.0
9 error npm v2.15.9
10 error code MODULE_NOT_FOUND
11 error Cannot find module './spawn'
12 error If you need help, you may report this error at:
12 error <https://github.com/npm/npm/issues>
13 verbose exit [ 1, true ]