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 'codex-tooltip', 'codex-notifier' #2390

Closed
rajmondx opened this issue Jun 21, 2023 · 2 comments
Closed

Cannot find module 'codex-tooltip', 'codex-notifier' #2390

rajmondx opened this issue Jun 21, 2023 · 2 comments
Labels

Comments

@rajmondx
Copy link

rajmondx commented Jun 21, 2023

Steps to reproduce:

  1. Install the package npm install --save @editorjs/editorjs (version: ^2.27.0)
  2. Use it somewhere eg. import EditorJS from '@editorjs/editorjs';
  3. Enjoy error logs:
Error: node_modules/@editorjs/editorjs/types/api/notifier.d.ts:1:78 
    \ - error TS2307: Cannot find module 'codex-notifier' or its corresponding type declarations.

1 import {ConfirmNotifierOptions, NotifierOptions, PromptNotifierOptions} from 'codex-notifier';
                                                                               ~~~~~~~~~~~~~~~~

Error: node_modules/@editorjs/editorjs/types/api/tooltip.d.ts:4:46 
    \ - error TS2307: Cannot find module 'codex-tooltip' or its corresponding type declarations.  

4 import {TooltipContent, TooltipOptions} from 'codex-tooltip';
                                               ~~~~~~~~~~~~~~~

It's caused because both packages are used as dev-dependencies so they wont be installed with npm install --save @editorjs/editorjs.

Current workaround is to manually npm install both packages as root dependencies (of course the same version as editorjs requires), which causes some typescript warning about unused ts compilation parts (its probably possible to exclude them in tsconfig.json).

I'm not sure if I'm doing something wrong here, because this bug should have been already known since I'm very likely not the only one using editorjs with typescript.

@Romanizat
Copy link

I have the exact issue on "@editorjs/editorjs": "^2.29.1", and yes I needed to manually install both codex-notifier and codex-tooltip in my Angular project

Sozialarchiv added a commit to Sozialarchiv/editor.js that referenced this issue Oct 12, 2024
neSpecc added a commit that referenced this issue Nov 6, 2024
* notifier and tooltip, fix closes #2591, #2390, #2462

* Update CHANGELOG.md

---------

Co-authored-by: Peter <[email protected]>
@neSpecc
Copy link
Member

neSpecc commented Nov 6, 2024

Resolved by #2842

@neSpecc neSpecc closed this as completed Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants