0
我想在meteorJS應用程序中使用tojocky/node-printer庫。 我下面安裝如何在meteorJS應用程序中使用tojocky/node-printer
meteor npm install --save node-printer
但是當我嘗試使用它,它似乎沒有奏效。
以下是我的代碼片斷
import { printer } from 'node-printer';
import './mainLayout.html';
Template.mainLayout.helpers({
printers: function() {
return printer.getPrinters();
}
});
我獲得以下錯誤
Exception in template helper: TypeError: Cannot read property 'getPrinters' of undefined
缺少什麼我在這裏?任何幫助,將不勝感激。