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 command `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!
Try logging into your Heroku account and then select your application and finally click on view logs. and check the logs that will help you to figure your mistake Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question. Provide details and share your research!
Try logging into your Heroku account and then select your application and finally click on view logs. and check the logs that will help you to figure your mistake
Heroku Connect emits log messages to Logplex making them available to your application via the CLI or using logging add-ons. Log entries follow the standard log format with a source of app, a dyno of herokuconnect and a message that contains structured data including standard fields such as event and level.
My guess is you deploy the content of your node-modules project folder with a bcrypt package that do not work on Heroku. You should add the node-modules folder in your .gitignore and just deploy the package.json file on the server, as this answer suggests.
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 command:
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:
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.)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With