Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to resolve "react-native-linear-gradient" from "node_modules\react-native-animated-linear-gradient\index.js" #71

Open
eatanga-git opened this issue Mar 30, 2023 · 3 comments

Comments

@eatanga-git
Copy link

I am trying to use this library, but I'm getting the error in the title.

I didn't even use it... I simply imported it like so:

import AnimatedLinearGradient, {presetColors} from 'react-native-animated-linear-gradient'

And got this error when trying to run.

This is the error message:
ERROR [Error: undefined Unable to resolve module react-native-linear-gradient from ....\node_modules\react-native-animated- linear-gradient\index.js: react-native-linear-gradient could not be found within the project or in these directories: node_modules 2 | import React, { Component } from 'react'; 3 | import { StyleSheet, StatusBar, Dimensions, View, Animated, Easing } from 'react-native'; > 4 | import NativeLinearGradient from 'react-native-linear-gradient'; | ^ 5 | import rgb2hex from 'rgb2hex';

I am using React Native Expo
Expo Version:
"expo": "~46.0.16",

Visual Studio Code

@shubham-spreadd
Copy link

Got any updates on this ?
@eatanga-git

@eatanga-git
Copy link
Author

I just gave up on it

@Descatres
Copy link

From what I saw, I think it is missing an "index.d.ts" file wich exports it in order to make react native able to use it.
If what I said works I'll leave it here.

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

No branches or pull requests

3 participants