react-native-modal-translucent icon indicating copy to clipboard operation
react-native-modal-translucent copied to clipboard

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

Open Gitdart opened this issue 5 years ago • 3 comments

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 avatar Sep 09 '19 13:09 Gitdart

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

Gitdart avatar Sep 09 '19 13:09 Gitdart

import的问题吗老兄?

Gitdart avatar Sep 09 '19 14:09 Gitdart

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

bdoycn avatar Jan 18 '20 09:01 bdoycn