jwagner / normalmap.js

normalmap.js is a library for creating simple interactive lighting effects using normal maps.
MIT License
184 stars 11 forks source link

How to install this vite js? #26

Closed Dev-Hassaan closed 1 month ago

Dev-Hassaan commented 1 month ago

I am kind of new to installing packages and dependencies but it's not working with Vite, Giving me errors like:

Could not find a declaration file for module 'normalmap'. 'd:/Hassaan_web/test/Normal-map-5/node_modules/normalmap/src/normalmap.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/normalmap` if it exists or add a new declaration (.d.ts) file containing `declare module 'normalmap';

I think it's not compatible with Vite right? Can you tell me how to properly install it?

jwagner commented 1 month ago

Hi Hassaan,

The package looks like it is installed correctly. The problem here is that you are trying to use a javascript package without type declaration with typescript. I'm not familiar with Vite, but I don't think it has much to do with the issue you are facing.

Check out the typescript docs for more information on type declarations https://www.typescriptlang.org/docs/handbook/2/type-declarations.html