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-notifier' #713

Closed
bkdiehl opened this issue Apr 10, 2019 · 6 comments
Closed

Cannot find module 'codex-notifier' #713

bkdiehl opened this issue Apr 10, 2019 · 6 comments
Assignees
Labels

Comments

@bkdiehl
Copy link

bkdiehl commented Apr 10, 2019

When I install @editorjs/editorjs version 2.12.4 through npm it gives me this error when I import EditorJS. TS2307: Cannot find module 'codex-notifier'.

@gohabereg gohabereg self-assigned this Apr 10, 2019
@iGeek0
Copy link

iGeek0 commented Apr 10, 2019

i have the same problema, the first time work great, but the next day show the same...

@iGeek0
Copy link

iGeek0 commented Apr 10, 2019

i found a solution just need no execute this comand
npm instal codex-notifier --save
nex you need to edit node_modules > codex-notifier > index.d.ts

and this to the top of code
import * as notifier from "codex-notifier";
its work for me!

@gohabereg
Copy link
Member

Hi @iGeek0

Thank you! We will update types definitions with the out of the box solution of this problem

@Tonvdpol
Copy link

When I apply this solution I get a new error:

[ ERROR ] TypeScript: node_modules/codex-notifier/index.d.ts:1:7 Circular definition of import alias 'notifier'.

I have EditorJS version 2.12.4 installed.

@bkdiehl
Copy link
Author

bkdiehl commented Apr 15, 2019

I noticed that this problem only comes up if I use an import statement. After implementing the workaround by @iGeek0, I was getting errors from server side rendering in my react app (ReferenceError: window is not defined). Changing the import statement to "require" in my componentDidMount method seems to have solved the problem, though now it's only rendered client side.

@gohabereg
Copy link
Member

Resolved by #719

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

4 participants