Skip to content

🐛 [Bug]: cannot npm start in Angular project, TS2307: Cannot find module 'html2canvas' or its corresponding type declaration. #334

@kagol

Description

@kagol

Version

latest

Link to minimal reproduction

在一个 Angular 项目中,安装 @opentiny/fluent-editor,然后本地启动报错:

Error: node_modules/@opentiny/fluent-editor/types/tools/screenshot.d.ts:1:71 - error TS2307: Cannot find module 'html2canvas' or its corresponding type declaration.

import { default as html2canvas, Options as Html2CanvasOptions } from 'html2canvas';

其实并没有配置 screenshot 模块,也没有安装 html2canvas 依赖。

该问题在 Vite + Vue 项目里不会出现。

Step to reproduce

如上

What is expected

No response

What is actually happening

No response

What is your project name

Wiki

Any additional comments (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions