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

I get the error "Unable to resolve module 'react-native-selectable-text' from '/path/' when trying to use #41

Closed
travisseh opened this issue Nov 12, 2019 · 3 comments · Fixed by #51

Comments

@travisseh
Copy link

I get the error "Unable to resolve module 'react-native-selectable-text' from '/path/': Module 'react-native-selectable-text' does not exist in the Haste module map.

I've tried about 20 different solutions from other issues in react-native (including this one: zetachang/react-native-dotenv#39 (comment)) and while they've worked with other similar bugs I've had, none of them work with this issue with this package.

I'm a bit of a newbie so any help at all would be appreciated!

System Information:

OS: macOS Mojave 10.14.5
CPU: (4) x64 Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz
Memory: 28.82 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash

Binaries:
Node: 11.2.0 - /usr/local/bin/node
Yarn: 1.16.0 - /usr/local/bin/yarn
npm: 6.13.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
IDEs:
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
@react-native-community/cli: ^2.9.0 => 2.9.0
react: 16.8.6 => 16.8.6
react-native: 0.60.5 => 0.60.5
npmGlobalPackages:
create-react-native-app: 2.0.2
react-native-cli: 2.0.1

@wernerfinck
Copy link

Hi,
i got the same error:

error: bundling failed: Error: Unable to resolve module react-native-selectable-text from src/components/Article/renderers.js: react-native-selectable-text could not be found within the project.

i run on debian 10 with react-native: 0.61.4

i added the lib and linked it with react-native link command
i tried to remove the nodes modules, clear watchman, clear metro cache

any idea ?

@rota-rossi
Copy link

the documentation is missing information. Instead of
import { SelectableText } from /react-native-selectable-text';
use:
import { SelectableText } from '@astrocoders/react-native-selectable-text';

@guilhermedecampo
Copy link
Member

@rota-rossi can you please push a PR to fix this 🚀?

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

Successfully merging a pull request may close this issue.

4 participants