Getting error "could not find declaration file for module ..." in React

Viewed 66

I generally use npm install to build node_modules. But for some reasons I removed node_modules folder, updated the node to v12.8.1 and did yarn install.

Then on I am getting the below errors.

  1. Module not found. although those modules are present in the node_modules.
  2. could not find declaration files... although we are not using typescript in the project.

Can someone help me with this?

1 Answers

Delete package-lock.json, yarn-lock.json files and node_modules folder. Again run npm install and check whether error persists.

Related