所以我目前正在做一个需要 POS 打印的离子项目。我尝试使用 esc-pos-encoder-ionic 但无法安装。我尝试了以下选项
npm i esc-pos-encoder-ionic
npm i esc-pos-encoder-ionic --canvas_binary_host_mirror=https://npm.taobao.org/mirrors/node-canvas-prebuilt/
这是我的错误响应
npm ERR! canvas@2.8.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the canvas@2.8.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.