Couldn't Find Declaration for Module 'poru'
Closed this issue · 8 comments
It is saying that it can not find the module for poru, I am using bun and it is giving me that error. Here is the full error
Could not find a declaration file for module 'poru'. '/home/carter/code/hyperion/node_modules/poru/dist/index.mjs' implicitly has an 'any' type.
There are types at '/home/carter/code/hyperion/node_modules/poru/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'poru' library may need to update its package.json or typings.
Fix that I used but won't work forever is to update the package.json from poru to export the index.d.ts as follows:
"exports": {
".": {
"import": "./dist/index.d.ts",
"require": "./dist/index.js"
}
},
Damn, i will add that
Could you try it with these exports, i just wanna confirm if it will work?
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"types": "./dist/index.d.ts"
}
},
Not at my machine, could I get back to you with that in about 6 or so hours?
Yeah sure! On npm the package won't be updated so often sadly, so if you want you can do:
npm i https://github.com/parasop/poru
till parasop updates it on NPM if it fixes the issue with the declaration file :D
I changed it and it worked beautifully, thank you for the fix. Much appreciated :)
I am glad to hear that! @UnschooledGamer or @parasop you can close this issue
Alright closing this Issue, Thanks @Joniii11 for looking into.