npm 報錯:
These dependencies were not found:
* canvas in ./node_modules/pdfh5/js/pdf.js
* dommatrix/dist/dommatrix.js in ./node_modules/pdfh5/js/pdf.js
* web-streams-polyfill/dist/ponyfill.js in ./node_modules/pdfh5/js/pdf.worker.js
To install them, you can run: npm install --save canvas dommatrix/dist/dommatrix.js web-streams-polyfill/dist/ponyfill.js
不能直接執(zhí)行他給的命令,那樣會報新的錯誤
第一步先執(zhí)行:
npm install canvas@2.8.0 --ignore-scripts
只執(zhí)行npm install canvas會報新的錯誤
第二步執(zhí)行:
npm install --save dommatrix
第三步執(zhí)行:
npm install --save web-streams-polyfill
然后就可以運行成功啦
我的node和npm版本如下:文章來源:http://www.zghlxwxcb.cn/news/detail-751955.html
文章來源地址http://www.zghlxwxcb.cn/news/detail-751955.html
到了這里,關(guān)于npm報錯:These dependencies were not found:* canvas in ./node_modules/pdfh5/js/pdf.js* dommatrix/dist/d的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!