React Native 错误 Module does not exist in the module map
发布时间:2020-12-15 06:48:13 所属栏目:百科 来源:网络整理
导读:bundling failed: "Unable to resolve module `login` from `/Users/zhangdi/work/rn/zhtxcs/app/pages/App.js`: Module does not exist in the module mapnnThis might be related to https://github.com/facebook/react-native/issues/4968nTo resolve
bundling failed: "Unable to resolve module `login` from `/Users/zhangdi/work/rn/zhtxcs/app/pages/App.js`: Module does not exist in the module mapnnThis might be related to https://github.com/facebook/react-native/issues/4968nTo 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' (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |