rbardini / resumed

👔 Lightweight JSON Resume builder, no-frills alternative to resume-cli
https://npm.im/resumed
MIT License
312 stars 25 forks source link

Fix could not find a declaration file for module 'resumed' #10

Closed ProfDoof closed 3 months ago

ProfDoof commented 9 months ago

Hi! I am getting an error from typescript when trying to build out my own little CLI for exporting as a PDF.

src/index.ts:3:24 - error TS7016: Could not find a declaration file for module 'resumed'. '/home/john/RemoteProjects/WebstormProjects/Resume/node_modules/resumed/dist/resumed.js' implicitly has an 'any' type.
  There are types at '/home/john/RemoteProjects/WebstormProjects/Resume/node_modules/resumed/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'resumed' library may need to update its package.json or typings.

3 import { render } from 'resumed';

I did some digging and found that there is an issue discussing this problem on the Microsoft/Typescript repo: https://github.com/microsoft/TypeScript/issues/52363

This led to me using the site Are the types wrong?: https://arethetypeswrong.github.io/?p=resumed%403.0.1

From the site I was directed to this documentation: https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/UntypedResolution.md

And from this I was able to determine that I need to get rid of the typings key from the package.json and rename the file produced by vite-plugin-dts. However, before I could do that, I had to get the building working correctly which required that I update all of the dependencies.

github-actions[bot] commented 3 months ago

:tada: This issue has been resolved in version 4.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: