我下面列出here在我的應用程序的NodeJS配置loggly的步驟時:錯誤設置loggly /溫斯頓
npm install winston
npm install winston-loggly-bulk
和index.js:
var winston = require('winston');
require('winston-loggly-bulk');
winston.add(winston.transports.Loggly, {
token: "8ea17e10-bfce-4f78-bc18-51ab6c61f78c",
subdomain: "qbesdeveloper",
tags: ["Winston-NodeJS"],
json:true
});
,但我不斷收到這錯誤:
Error: Cannot find module 'loggly'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/home/user/totoapi/node_modules/winston-loggly-bulk/lib/winston-loggly.js:10:14)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/home/user/totoapi/index.js:10:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
剛剛有完全相同的問題,並同意文檔應該說。 在twitter上詢問是否有更好的地方可以舉報此https://twitter.com/DinisCruz/status/791933439238746113 –