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

❓module declaration error. #2143

Open
dipankakalita opened this issue Sep 21, 2022 · 5 comments
Open

❓module declaration error. #2143

dipankakalita opened this issue Sep 21, 2022 · 5 comments

Comments

@dipankakalita
Copy link

Could not find a declaration file for module '@editorjs/Header'. 'D:/wap/ANGULAR/editorjs/node_modules/@editorjs/header/dist/bundle.js' implicitly has an 'any' type.
Try npm i --save-dev @types/editorjs__header if it exists or add a new declaration (.d.ts) file containing declare module '@editorjs/Header';ts(7016)

import Header from '@editorjs/Header';

While I tried to build using ng build I found this error. How to solve this problem in angular?

@HussamBarbour
Copy link

you can add @ts-ignore comment above import
// @ts-ignore
import Header from '@editorjs/Header';

@Alexnortung
Copy link

// ./types/types.d.ts
declare module "@editorjs/header"
// tsconfig.json
{
  // ...
  "typeRoots": ["./node_modules/@types", "./types"]
}

@mrvdot
Copy link

mrvdot commented Sep 1, 2023

Same problem, except for list (was able to manually install typing for the Header). I know I can ignore (or mock) it, but it would be nice to actually have that type info. Is that coming?

@hemiftw
Copy link

hemiftw commented Sep 3, 2023

you can add @ts-ignore comment above import // @ts-ignore import Header from '@editorjs/Header';

it worked for me thanks

@190km
Copy link

190km commented Jun 10, 2024

// ./types/types.d.ts
declare module "@editorjs/header"
// tsconfig.json
{
  // ...
  "typeRoots": ["./node_modules/@types", "./types"]
}

worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants