首页 > 解决方案 > React-Native Error: Unable to resolve module

问题描述

React Native 0.63.4

Out of what seems like nowhere, I'm getting Error: Unable to resolve module '../../realm' from '/src/my/source/file'. This isn't really realm specific. It was working until this morning and then I did a fresh install on the android emulator and it is now red screening.

If I change import Realm from 'realm' to import Realm from '../../../node_modules/realm' it works fine. I've deleted my node_modules dir and ran npm i again. Cleared any cache I know about. Just have no idea why this happens.

标签: androidreact-native

解决方案


推荐阅读