skip to Main Content

I’ve installed, through npm (npm install react-native-elements --save and npm i --save react-native-vector-icons) two packages in my react-native (Expo) project. But the VS Code does not suggest elements from this package and keep suggesting elements from react-native instead of react-native-elements with the same name.

Would you mind explaining to me how can I force VS code to find, suggest and import this packages.

Things I’ve tried:
1 – restart VS code
2 – restart computer
3 – start over again a new project and reinstall all the packages.

The following image refers to the VS Code displaying the packages correctly installed and the menu does not suggesting the same package.

enter image description here

I’m trying to make VS code recognize, suggest and import the installed packages through npm.

2

Answers


  1. Chosen as BEST ANSWER

    For some reason, I uninstalled VS code, proceed the entire configuration again and now it is working. I don't know if It is a problem with previous configuration or some VS code bug. I've done the same steps and this time it is working. Thank you Dwayne for your tip.


  2. I use an extension called ‘npm Intellisense’ and it works great for me! It’s an addon by Christian Kohler.

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