【问题标题】:Can't understand error in Node.js [duplicate]无法理解 Node.js 中的错误 [重复]
【发布时间】:2018-07-14 11:00:18
【问题描述】:

我是 Node.js 的新手,在我的项目中,我在本地(macOS 上的 Node.js 版本为 9.10.1)和服务器(Ubuntu 上的 Node.js 版本为 10.6.0)运行它

在本地,一切运行良好,但在服务器中,当我运行node app.js 时,我会收到以下错误

(node:17488) [DEP0095] DeprecationWarning: timers.enroll() is 
deprecated. Please use setTimeout instead.
(node:17488) [DEP0096] DeprecationWarning: timers.unenroll() is 
deprecated. Please use clearTimeout instead.
app runs on port 3000

如何找到问题所在?非常感谢。

【问题讨论】:

标签: javascript node.js koa


【解决方案1】:

只需使用setTimeoutclearTimeout 代替timers.enrolltimers.unenroll

查看DeprecationWarning: timers.unenroll() question

【讨论】:

    【解决方案2】:

    只更新mysql版本:

    npm install mysql --save
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-03-03
      • 2016-11-14
      • 2015-06-28
      • 2011-04-12
      • 2018-05-16
      • 2017-09-03
      • 1970-01-01
      相关资源
      最近更新 更多