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

🐞 - Build error "Could not find a declaration file for module 'markdown-it'" after update to 4.10.0 #1457

Closed
hatsantos opened this issue Sep 25, 2024 · 3 comments · Fixed by #1461
Labels
bug Something isn't working state: need triage state need triage

Comments

@hatsantos
Copy link

Code Example URL

stackblitz.com

Description

After updating to @taiga-ui/editor 4.10.0 a production build gets the following error:

> ng.cmd run app:build:production --stats-json
Application bundle generation failed. [12.567 seconds]

▲ [WARNING] The glob pattern import("./**/*.entry.js*") did not match any files [empty-glob]

    node_modules/.pnpm/@stencil+core@4.20.0/node_modules/@stencil/core/internal/client/index.js:82:2:
      82 │   `./${bundleId}.entry.js${BUILD4.hotModuleReplacement && hmrVersi...
         ╵   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


▲ [WARNING] The glob pattern import("./**/*.entry.js*") did not match any files [empty-glob]

    node_modules/.pnpm/@stencil+core@4.21.0/node_modules/@stencil/core/internal/client/index.js:82:2:
      82 │   `./${bundleId}.entry.js${BUILD4.hotModuleReplacement && hmrVersi...
         ╵   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


X [ERROR] TS7016: Could not find a declaration file for module 'markdown-it'. 'D:/work/abodesoft/asoftweb/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/dist/index.cjs.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/markdown-it` if it exists or add a new declaration (.d.ts) file containing `declare module 'markdown-it';` [plugin angular-compiler]

    node_modules/.pnpm/@taiga-ui+editor@4.10.0_raf43qm3p3j47utrsgtqzm455y/node_modules/@taiga-ui/editor/extensions/markdown/parse/index.d.ts:2:23:
      2 │ import MarkdownIt from 'markdown-it';
        ╵                        ~~~~~~~~~~~~~


X [ERROR] TS7016: Could not find a declaration file for module 'markdown-it'. 'D:/work/abodesoft/asoftweb/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/dist/index.cjs.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/markdown-it` if it exists or add a new declaration (.d.ts) file containing `declare module 'markdown-it';` [plugin angular-compiler]

    node_modules/.pnpm/prosemirror-markdown@1.13.0/node_modules/prosemirror-markdown/dist/index.d.ts:2:23:
      2 │ import MarkdownIt from 'markdown-it';
        ╵                        ~~~~~~~~~~~~~


X [ERROR] TS2307: Cannot find module 'markdown-it/lib/token' or its corresponding type declarations. [plugin angular-compiler]

    node_modules/.pnpm/prosemirror-markdown@1.13.0/node_modules/prosemirror-markdown/dist/index.d.ts:3:18:
      3 │ import Token from 'markdown-it/lib/token';
        ╵                   ~~~~~~~~~~~~~~~~~~~~~~~


[ERROR] An error occurred while running subprocess ng.
        
        ng.cmd run app:build:production --stats-json exited with exit code 1.
        
        Re-running this command with the --verbose flag may provide more information.
 ELIFECYCLE  Command failed with exit code 1.

Taiga UI version

4.8.1

Browser Used

Chrome

OS Used

macOS

@hatsantos hatsantos added bug Something isn't working state: need triage state need triage labels Sep 25, 2024
@splincode
Copy link
Member

Could you add github repo for reproducton?

@hatsantos
Copy link
Author

Sure... I just created a new angular project, added @taiga-ui and then @taiga-ui/editor.

https://github.com/hatsantos/taiga-editor-4.10.git

Fixed editor version to 4.9.0 and them did a pnpm install and a ng serve:

image

After that... upgraded editor to version 4.10.0 and did a pnpm install and a ng serve:

image

@hakimio
Copy link
Contributor

hakimio commented Sep 26, 2024

Related issue: #1412
Related PR: #1447

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working state: need triage state need triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants