Uploaded image for project: 'Appcelerator CLI'
  1. Appcelerator CLI
  2. CLI-907

Node warnings corrupts JSON output: (node) sys is deprecated. Use util instead.


    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Duplicate
    • Affects Version/s: Release 5.1.0, Release 5.2.0
    • Fix Version/s: None
    • Component/s: Core, Titanium
    • Labels:
    • Environment:

      NodeJS 4.2.3
      appc -v -o json

    • Severity:


      I've received two reports of our CLIs displaying (node) sys is deprecated. Use util instead. and by doing so corrupting JSON output.

      I personally can't reproduce with the exact same versions. I was first suspecting that some dependency of ours was still using sys. That could be true for the Titanium CLI (which doesn't use shrink-wrap), but Jason is also getting it for the AppC CLI (which does use shrink-wrap).

      I asked Jason to see if he could find what was using sys, but the strange thing was that he had the same results as me; which is that it is only used in some tests of the request module.

      $ egrep -R "'sys'|\"sys\"" /usr/local/lib/node_modules/appcelerator
      /usr/local/lib/node_modules/appcelerator/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js:var sys = require('sys');
      $ egrep -R "'sys'|\"sys\"" ~/.appcelerator/install/5.2.0-55/package/node_modules/appc-cli-titanium/
      /Users/jkneen/.appcelerator/install/5.2.0-55/package/node_modules/appc-cli-titanium//node_modules/node-appc/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js:var sys = require('sys');
      /Users/jkneen/.appcelerator/install/5.2.0-55/package/node_modules/appc-cli-titanium//node_modules/titanium/node_modules/node-appc/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js:var sys = require('sys');
      /Users/jkneen/.appcelerator/install/5.2.0-55/package/node_modules/appc-cli-titanium//node_modules/titanium/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js:var sys = require('sys');

      And same for the Titanium OSS CLI:

      egrep -R "'sys'|\"sys\"" /usr/local/lib/node_modules/titanium/
      /usr/local/lib/node_modules/titanium//node_modules/node-appc/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js:var sys = require('sys');
      /usr/local/lib/node_modules/titanium//node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js:var sys = require('sys');

      So.. I really have no idea how these errors happen for them and not for me. The only difference that I can think of is that Jason uses n to switch Node versions and I don't.

      You do get a lot more listings if you do:

      $ egrep -R "'sys'|\"sys\"" ~/.appcelerator/install/5.2.0-55/package


          Issue Links



              • Assignee:
                emerriman Eric Merriman
                fokkezb Fokke Zandbergen
              • Watchers:
                2 Start watching this issue


                • Created:

                  Git Integration