Cannot find module 'pinia-orm/decorators' or its corresponding type declarations.ts(2307) using Typescript
Environment
VSCode: 1.86.0 pinia: ^2.1.7 pinia-orm: ^1.7.2 typescript: ^5.3.3 vite: ^5.0.12 vite-plugin-vuetify: ^2.0.1 vue: ^3.4.15 vue-tsc: ^1.8.27
Reproduction
just follow the website 'https://pinia-orm.codedredd.de/guide/getting-started/typescript'
Describe the bug
as the title description, and when not using decorators and try to insert a new user as the docs there's no autocomplete unless export an interface describe the model fileds
Additional context
No response
Logs
No response
Edit: by checking the pinia-orm installed package I couldn't find any declarations folder/file except the dist folder.
Can you please try import { Attr, Cast, Uid } from 'pinia-orm/dist/decorators' ... i know i need to adapt the docs. Have a lot of todos :)
@annymosse You are probably using "moduleResolution": "node" in your tsconfig.json file. It's deprecated and causes various resolution problems in modern code. Please check out this discussion.
Can you please try
import { Attr, Cast, Uid } from 'pinia-orm/dist/decorators'... i know i need to adapt the docs. Have a lot of todos :)
@CodeDredd Sorry for the delay, I tried it and it didn't work, I will try to use "moduleResolution" it might work as @daniser mentioned above.
This seems to be solved by using the right "moduleResolution". Updating my packages also to nodenext