Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Error: While trying to resolve module react-native-modal-translucent from file #31

Open
Gitdart opened this issue Sep 9, 2019 · 3 comments

Comments

@Gitdart
Copy link

Gitdart commented Sep 9, 2019

bundling failed: Error: While trying to resolve module react-native-modal-translucent from file /Users/xxxxxx/Documents/project/RN/xxxxxxxxxxxxx/home/src/pages/login/LoginPage.js, the package /Users/xxxxxx/Documents/project/RN/xxxxxxxxxxxxx/home/node_modules/react-native-modal-translucent/package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (/Users/xxxxxx/Documents/project/RN/xxxxxxxxxxxxx/home/node_modules/react-native-modal-translucent/index. Indeed, none of these files exist:

"react-native": "0.60.4",
"react-native-modal-translucent": "^3.0.1",

"scripts": {
"start": "react-native start",
"test": "jest",
"lint": "eslint .",
"fix-modal": "node node_modules/react-native-modal-translucent/scripts/translucent-modal.js",
"postinstall": "npm run fix-modal"
},

@Gitdart
Copy link
Author

Gitdart commented Sep 9, 2019

npm run fix-modal 也执行了.还是报上面的错

@Gitdart
Copy link
Author

Gitdart commented Sep 9, 2019

import的问题吗老兄?

@bdoycn
Copy link

bdoycn commented Jan 18, 2020

这个包不需要引入
直接用 RN 的 Modal 就行 它修改了 Modal 的实现

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants