Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

ProfDoof
Copy link

@ProfDoof ProfDoof commented Mar 4, 2024

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: microsoft/TypeScript#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.

@ProfDoof ProfDoof changed the title Update deps Fix could not find a declaration file for module 'resumed' Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant