reactNative报错 throw err;

module.js:338 
throw err; 
^Error: Cannot find module xxxxxx
at Function.Module._resolveFilename (module.js:336:15) 
at Function.Module._load (module.js:278:25) 
at Module.require (module.js:365:17)
 at require (module.js:384:17) 
at Object. (/Users/xxxx/Dev/GitHubLibrary/react-native/node_modules/chalk/index.js:2:26)
 at Module._compile (module.js:460:26) 
at Object.Module._extensions..js (module.js:478:10) 
at Module.load (module.js:355:32) 
at Function.Module._load (module.js:310:12) 
at Module.require (module.js:365:17)

XXXXXX可以是任何依赖.
解决方法就是 安装这个依赖就可以了代码如下:

npm install --save XXXXXXX

你可能感兴趣的:(reactNative报错 throw err;)