您的位置:首页 > Web前端 > React

React Native 错误 Module does not exist in the module map

2017-09-21 19:21 381 查看
bundling failed: "Unable to resolve module `login` from `/Users/zhangdi/work/rn/zhtxcs/app/pages/App.js`: Module does not exist in the module map\n\nThis might be related to https://github.com/facebook/react-native/issues/4968\nTo resolve try the following:\n  1. Clear watchman watches: `watchman watch-del-all`.\n  2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.\n  3. Reset packager cache: `rm -fr $TMPDIR/react-*` or `npm start -- --reset-cache`."




看错误说是找不到路径

import Login from 'login'
import Index from 'index'
导入自己写的js一定不要忘了写‘./’,否则会以为引入的是modules。。。。

改成:

import Login from './login'
import Index from './index'
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐