【问题标题】:nodemon or nodemon index.js not working on ubuntu 16.04nodemon 或 nodemon index.js 不适用于 ubuntu 16.04
【发布时间】:2021-01-27 23:24:15
【问题描述】:

我试图在每次推送后自动运行我的服务器,不想每次都在 ubuntu 实例 16.04 上重新启动

/usr/local/lib/node_modules/nodemon/lib/monitor/run.js:356
    let sig = signal.replace('SIG', '');
    ^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/nodemon/lib/monitor/index.js:2:8)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)

有这个错误,谁能告诉我是什么问题?

【问题讨论】:

  • 你安装的nodejs版本是多少?

标签: node.js express node-modules nodemon


【解决方案1】:

感谢好友@developerKumar,抱歉回复晚了。 你给了我一个提示,我只是升级我的节点版本和它的工作。

【讨论】:

    猜你喜欢
    • 2017-06-30
    • 2017-10-16
    • 1970-01-01
    • 2019-01-25
    • 2018-09-24
    • 2021-11-30
    • 2016-08-10
    • 2017-01-25
    • 1970-01-01
    相关资源
    最近更新 更多