Error after installing and importing use-sound in react using vite and typescript

132 Views Asked by At

while working with typescript and vite on react and after installing use-sound and howler library, I tried to import just the use-sound into my component but i get the error {There are types at 'c:/Users/USER/Desktop/quizy/quizy/node_modules/use-sound/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'use-sound' library may need to update its package.json or typings.} i installed and update use sound using (npm install use-sound and npm update use-sound) i also installed typescript definitions with (npm install @types/use-sound), yet the error message persisted.

I tried importing use-sound into my component and i was expecting and error free script.

0

There are 0 best solutions below