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

Cannot find module 'json.macro/types' or its corresponding type declarations #943

Closed
ocavue opened this issue Apr 28, 2021 · 0 comments · Fixed by #944
Closed

Cannot find module 'json.macro/types' or its corresponding type declarations #943

ocavue opened this issue Apr 28, 2021 · 0 comments · Fixed by #944
Labels
type: bug 🪲 Something isn't working

Comments

@ocavue
Copy link
Member

ocavue commented Apr 28, 2021

Summary

I'm using remirror in a typescript project. When I build this project with tsc, I get the following error:

$ tsc
node_modules/remirror/dist/declarations/src/index.d.ts:1:38 - error TS2307: Cannot find module 'json.macro/types' or its corresponding type declarations.

1 import type { SemanticVersion } from 'json.macro/types';
                                       ~~~~~~~~~~~~~~~~~~

We use the npm package json.macro to read the package.json at the build time, and that's why we only add this package in devDependencies.

Steps to reproduce

N/A

Expected results

Not error.

Actual results

Got error bacause tsc can't find json.macro in the node_modules.

Possible Solution

Copy the type from json.macro into the remirror repo.

@ocavue ocavue added the type: bug 🪲 Something isn't working label Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🪲 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant