运行ng build --prod和firebase部署时出错使用jsPDF时

时间:2018-06-03 08:21:22

标签: javascript html angular jspdf fromhtml

我正在使用jsPDF库,我似乎在运行build和deploy命令时不断收到此错误。

这是它吐出的错误。

./node_modules/@types/jspdf/index.d.ts:186:32 - error TS2304: Cannot find name 'HTMLElement'.

186         fromHTML(HTML:string | HTMLElement, x:number, y:number, settings?:any, callback?:Function, margins?:any):jsPDF;
                                   ~~~~~~~~~~~


npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! functions@ build: `tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the functions@ build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

我已经尝试过改变“lib”部分中tsconfig.json中的内容。它目前是:

['es6','dom']

不确定要做什么

0 个答案:

没有答案