imacrayon / alpine-ajax

An Alpine.js plugin for building server-powered frontends.
https://alpine-ajax.js.org
MIT License
558 stars 11 forks source link

Could not find a declaration file for module '@imacrayon/alpine-ajax' #57

Closed michaylen closed 4 months ago

michaylen commented 6 months ago

Could not find a declaration file for module '@imacrayon/alpine-ajax'. 'c:/Users/Michaylen/Desktop/laravel-app/node_modules/@imacrayon/alpine-ajax/dist/module.cjs.js' implicitly has an 'any' type. Try npm i --save-dev @types/imacrayon__alpine-ajax if it exists or add a new declaration (.d.ts) file containing declare module '@imacrayon/alpine-ajax';ts(7016)

VS Code

imacrayon commented 6 months ago

Hey thanks for reporting this. Do you have an idea of what might be the problem, or steps to reproduce? It looks Typescript related and I have no experience with Typescript 😬

sparkcanon commented 6 months ago

If you add a env.d.ts (name is irrelevant i think but needs to be *.d.ts) file with declare module "@imacrayon/alpine-ajax"; in it. That should fix the error 🤞🏼

imacrayon commented 4 months ago

I'm gonna close this out, but feel free to reopen if sparkcanon's suggestion didn't work.