【发布时间】:2018-01-09 18:04:57
【问题描述】:
我正在研究电子 + angularjs。当我使用id3js 从 mp3 文件中读取标签时,我开始遇到DeprecationWarning: Calling an asynchronous function without callback is deprecated. 的问题。
id3({file: pathtofile,type: id3.OPEN_LOCAL}, function(err, tags) {
if (err) {
console.log(err);
} else {
console.log(tags);}
});
代码从 mp3 文件中重新调整标签,但继续生成此弃用警告
【问题讨论】:
-
你有什么问题?
-
我想知道为什么会出现这个错误以及如何解决它
-
看来您必须使用 Mistalis 评论中链接中的建议,并生成堆栈跟踪,以确定谁在调用 API 而无需回调。
标签: javascript node.js asynchronous electron