Error "Cannot find module 'react' or its corresponding type declarations." inside our sharePoint onl

Valued Contributor

I am working on an 1.14 SPFX web part, but inside the .ts file we are getting reference errors on almost all the libraries as shown in this picture:-

adashi.png

For example, on the first reference error "Cannot find module 'react' or its corresponding type declarations... i tried those commands:-

npm install react

npm install --save-dev @types/react

npm i @microsoft/rush-stack-compiler-3.9

but did not fix anything.. any advice on this please?

Thanks

0 Replies