How to get the version 1.6.2 from npm?



  • npm lowsync now provide 1.4.10, but now I face a issue about missing the root certs.

    It seem to be fixed in 1.6.1.

    My question is "How the get the latest binary version and flash it?"

    Thank you very much.



  • Hello!
    lowsync 1.4.10 is the current version and it will flash the newest low.js (which is > 1.6.1).
    So it should work.
    Can you show an example source code with the problem?
    Thank you!
    Thomas



  • This post is deleted!


  • @neoniousTR

    The example from Nodejs:

    const https = require('https');
    
    https.get('https://encrypted.google.com/', (res) => {
      console.log('statusCode:', res.statusCode);
      console.log('headers:', res.headers);
    
      res.on('data', (d) => {
        process.stdout.write(d);
      });
    
    }).on('error', (e) => {
      console.error(e);
    });
    

    The result:

    TypeError: cannot resolve module 'internal/root-certs.json', parent 'lib:tls'
        at [anon] internal
        at require () native strict preventsyield
        at rootCertificates (lib:tls:133) strict preventsyield
        at TLSSocket (lib:tls:47) strict construct
        at connect (lib:tls:64) strict tailcall
        at [anon] (lib:https:181) strict
        at ClientRequest (lib:internal/http:596) strict construct
        at request (lib:https:259) strict
        at get (lib:https:262) strict
        at [anon] (/index.js:11) strict preventsyield
    


  • What does console.log(process.versions); say?



  • @neoniousTR

    Thank you for your reply.

    The output of the command is:

    --- User program's output: ---
    { lowjs: '20210228_3479cc6',
      lowjs_esp32: '20210228',
      node: '10.0.0',
      ares: '1.16.1',
      duktape: 'v2.3.0-495-g068131a2-dirty',
      mbedtls: '2.16.5',
      openssl: 'mbedtls 2.16.5' }
    --- Program exited. ---
    


  • You actually have the newest version. Seems like the file is still not in the package for all versions (only tested neonious one). Will be fixed in the next version, whenever that will be deployed.

    Take the file from here: https://raw.githubusercontent.com/neonious/lowjs/master/util/root-certs.json

    Give it to https.get via the ca option:
    { ca: require('./root-certs.json'); }

    That will overwrite that low.js tries to add it.

    Thomas


Log in to reply