skip to Main Content

Using RN And typescript, when I try and install, react-native-linear-gradient, I get the above error and the package doesn’t install.

How can I use the package in my app?

enter image description here

2

Answers


  1. have you tried with yarn?
    yarn add react-native-linear-gradient

    Login or Signup to reply.
  2. Add this in your package.json

        "react-native-linear-gradient": "^2.6.2",

    And then run npm install after that run your code with "npx react-native run-android"

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search