Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Using fancyapps with react / typescript #2626

Open
aminmousavi5147 opened this issue Nov 24, 2021 · 1 comment
Open

Using fancyapps with react / typescript #2626

aminmousavi5147 opened this issue Nov 24, 2021 · 1 comment

Comments

@aminmousavi5147
Copy link

Hello!
I'm having a problem using fancyapps with react / typescript.
When I try to import { Fancybox as NativeFancybox } from '@fancyapps/ui'; I'll get the following error:
Could not find a declaration file for module'@fancyapps/ui`. 'd:/ionic/myproject/node_modules/@fancyapps/ui/dist/fancybox.umd.js' implicitly has an any type.
Try 'npm i --save-dev @types/fancyapps__ui' if it exists or add a new declaration (.d.ts) file containing 'declare module "@fancyapps/ui"';
I tried to install @types/fancyapps__ui but I'll get the error 404 not found!
Also I created a folder with the name of the module inside of the 'node_modules/@types', containing an index.d.ts file and inside of the index file I put 'declare module "@fancyapps/ui"'. After this the error went away but if I install / uninstall a new package, fancyapps_ui folder will dissapear!

@machour
Copy link

machour commented May 13, 2022

You may want to ask on https://github.com/fancyapps/ui instead

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants