Failed to build DependencyGraph
2016-06-08 16:06
417 查看
Failed to build DependencyGraph: @providesModule naming collision:
错误提示
> demo@0.0.1 start /Users/holoto/WebstormProjects/demo > node node_modules/react-native/local-cli/cli.js start ┌────────────────────────────────────────────────────────────────────────────┐ │ Running packager on port 8081. │ │ │ │ Keep this packager running while developing on any JS projects. Feel │ │ free to close this tab and run your own packager instance if you │ │ prefer. │ │ │ │ https://github.com/facebook/react-native │ │ │ └────────────────────────────────────────────────────────────────────────────┘ Looking for JS files in /Users/holoto/WebstormProjects/demo [3:39:16 PM] <START> Building Dependency Graph [3:39:16 PM] <START> Crawling File System [Hot Module Replacement] Server listening on /hot React packager ready. [3:39:18 PM] <END> Crawling File System (1203ms) [3:39:18 PM] <START> Building in-memory fs for JavaScript [3:39:18 PM] <END> Building in-memory fs for JavaScript (223ms) [3:39:18 PM] <START> Building in-memory fs for Assets [3:39:18 PM] <END> Building in-memory fs for Assets (140ms) [3:39:18 PM] <START> Building Haste Map [3:39:18 PM] <START> Building (deprecated) Asset Map [3:39:18 PM] <END> Building (deprecated) Asset Map (99ms) Failed to build DependencyGraph: @providesModule naming collision: Duplicate module name: String.prototype.es6 Paths: /Users/holoto/WebstormProjects/demo/node_modules/react-native-router/node_modules/react-native/packager/react-packager/src/DependencyResolver/haste/polyfills/String.prototype.es6.js collides with /Users/holoto/WebstormProjects/demo/node_modules/react-native/packager/react-packager/src/Resolver/polyfills/String.prototype.es6.js This error is caused by a @providesModule declaration with the same name accross two different files. Error: @providesModule naming collision: Duplicate module name: String.prototype.es6 Paths: /Users/holoto/WebstormProjects/demo/node_modules/react-native-router/node_modules/react-native/packager/react-packager/src/DependencyResolver/haste/polyfills/String.prototype.es6.js collides with /Users/holoto/WebstormProjects/demo/node_modules/react-native/packager/react-packager/src/Resolver/polyfills/String.prototype.es6.js This error is caused by a @providesModule declaration with the same name accross two different files. at HasteMap._updateHasteMap (/Users/holoto/WebstormProjects/demo/node_modules/node-haste/lib/DependencyGraph/HasteMap.js:162:15) at /Users/holoto/WebstormProjects/demo/node_modules/node-haste/lib/DependencyGraph/HasteMap.js:127:25 npm ERR! Darwin 15.5.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" npm ERR! node v6.2.1 npm ERR! npm v3.9.3 npm ERR! code ELIFECYCLE npm ERR! demo@0.0.1 start: `node node_modules/react-native/local-cli/cli.js start` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the demo@0.0.1 start script 'node node_modules/react-native/local-cli/cli.js start'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the demo package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node node_modules/react-native/local-cli/cli.js start npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs demo npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls demo npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /Users/holoto/WebstormProjects/demo/npm-debug.log
错误原因
react-native-router自带了一个
react-native
在目录
node_modules/react-native-router/node_modules/react-native
解决方案
删除react-native-router的
react-native目录
bash在项目目录下执行
rm -R node_modules/react-native-router/node_modules/react-native
参考
https://github.com/facebook/react-native/issues/3558相关文章推荐
- 详解HDFS Short Circuit Local Reads
- 访问Nginx发生SSL connection error的一种情况
- 星外虚拟主机访问被控出现Unspecified error解决方法
- IIS 错误 Server Application Error 详细解决方法
- On Error Resume Next 语句
- IIS运行错误 Server Application Error 错误代码 Error: 8004的解决方法
- Lua编程示例(一):select、debug、可变参数、table操作、error
- 收集整理的http/1.1 500 server error错误的解决方法
- SQL 2005 ERROR:3145 解决办法(备份集中的数据库备份与现有的数据库不同)
- VBScript中On Error语句用法小结
- SQL Server Native Client下载 SQL Server Native Client安装方法
- 解决VC++编译报错error C2248的方案
- 超级给力的JavaScript的React框架入门教程
- JavaScript的React框架中的JSX语法学习入门教程
- 由ReactJS的Hello world说开来
- 深入探讨前端框架react
- jQuery Uploadify 上传插件出现Http Error 302 错误的解决办法
- JQuery ajax中error返回错误及一直返回error的解答
- PHP函数之error_reporting(E_ALL ^ E_NOTICE)详细说明
- node.js使用npm 安装插件时提示install Error: ENOENT报错的解决方法