最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Heroku log warning "(node) sys is deprecated. Use util instead" when script runs - Stack Overflow

programmeradmin5浏览0评论

I have deployed a node script in heroku to be run by a scheduler. But when the script runs I see a warning in the logs.

Dec 07 11:01:10 xxx heroku/scheduler.3255 Starting process with mand `node bin/script` 
Dec 07 11:01:13 xxx app/scheduler.3255:  (node) sys is deprecated. Use util instead. 

I have not declared a engine section in my package.json.

Is a problem with the node version? How can I avoid this warning?

Thanks!

I have deployed a node script in heroku to be run by a scheduler. But when the script runs I see a warning in the logs.

Dec 07 11:01:10 xxx heroku/scheduler.3255 Starting process with mand `node bin/script` 
Dec 07 11:01:13 xxx app/scheduler.3255:  (node) sys is deprecated. Use util instead. 

I have not declared a engine section in my package.json.

Is a problem with the node version? How can I avoid this warning?

Thanks!

Share Improve this question edited Jan 13, 2016 at 15:22 Guy 67.4k101 gold badges265 silver badges331 bronze badges asked Dec 8, 2015 at 16:51 ezainezain 1,4851 gold badge16 silver badges34 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

This is happening because (obviously) 'sys' has been deprecated and replaced by 'util'.

If you are not using 'sys' directly (search your codebase for something like require('sys') ) then one of the modules that you depend on (or its dependencies) might be.

To find the offending module do an npm install on your project and then grep for require('sys') (or with double quotes) to see if you can find the module. Example grep mand:

grep -r "require('sys')" .

If you really want that warning to go away and it's in a dependency or sub-dependency then you have a couple of choices:

  1. Replace the module that's using sys with one that isn't yet provides the same functionality. (Check that there isn't a more recent version of the module that's addressed this issue.)
  2. Submit a Pull Request fixing the issue in the module.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论