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

Typescript not resolving types #90

Open
josstn opened this issue Jul 26, 2024 · 2 comments · May be fixed by #94
Open

Typescript not resolving types #90

josstn opened this issue Jul 26, 2024 · 2 comments · May be fixed by #94

Comments

@josstn
Copy link

josstn commented Jul 26, 2024

When importing @editorjs/paragraph in a typescript project with modern settings (package.json type=module, tsconfig moduleResolution=bundler), it does not resolve the typings for Paragraph.

I get error TS7016: Could not find a declaration file for module @editorjs/paragraph.

Further it says:
There are types at node_modules/@editorjs/paragraph/dist/index.d.ts, but this result could not be resolved when respecting package.json exports. The @editorjs/paragraph library may need to update its package.json or typings.

More explanations and solution at this site: https://www.kravchyk.com/typescript-npm-package-json-exports/

One can also check the package here: https://arethetypeswrong.github.io/?p=%40editorjs%2Fparagraph%402.11.6

@PrestigeLulu
Copy link

same issue

@Koffer0-0
Copy link

Koffer0-0 commented Sep 10, 2024

I had also updated recently from "vite": "4.3.4" to "^4.5.3", "vue-tsc": "^1.8.11" to "vue-tsc": "^2.1.4", because of npm vulnerabilities, and I made "audit fix --force" and after that, it broke down.

UPD: I found the issue - it conflicts with another package "Vee-validate" ^4.13.2, it updates package-lock.json, so it led to console errors with
"Module Tools was skipped because of RangeError: Maximum call stack size exceeded"
"Tool «paragraph» is not found. Check 'tools' property at the Editor.js config."

UPD2: Vee-validate updates some vue packages as minimal versions to use, and it had broke behavior or provide/inject and their initialization in component

@gorenburg gorenburg linked a pull request Oct 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants