./bin/sanitycheck.js How to use ?

Posted on
  • Hi

    I am following the guide - https://www.espruino.com/Bangle.js+App+Loader
    I am trying to run ./bin/sanitycheck.js

    Alas I do not have too much experience of nodejs. I have now installed, nodejs but ...

    $ bin/sanitycheck.js 
    internal/modules/cjs/loader.js:818
      throw err;
      ^
    
    Error: Cannot find module '../webtools/heatshrink'
    Require stack:
    - /home/bms/BangleApps/bin/sanitycheck.js
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
        at Function.Module._load (internal/modules/cjs/loader.js:667:27)
        at Module.require (internal/modules/cjs/loader.js:887:19)
        at require (internal/modules/cjs/helpers.js:85:18)
        at Object.<anonymous> (/home/bms/BangleApps/bin/sanitycheck.js:7:18)
        at Module._compile (internal/modules/cjs/loader.js:999:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
        at Module.load (internal/modules/cjs/loader.js:863:32)
        at Function.Module._load (internal/modules/cjs/loader.js:708:14)
        at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) {
      code: 'MODULE_NOT_FOUND',
      requireStack: [ '/home/bms/BangleApps/bin/sanitycheck.js' ]
    }
    
    $ ls webtools/
    $
    

    webtools is empty

    This - https://github.com/espruino/BangleApps/blob/master/bin/README.md suggests

    You should also check out https://github.com/espruino/EspruinoAppLoaderCore/tree/master/tools (available in core/tools in this repo) - this contains tools for handling languages, as well as a command-line based app loader
    

    I tried to do this clone this repository and can get the tools into webtools, but I am doing something wrong and can get his correct.

    This tarvis runs suggests - https://github.com/espruino/BangleApps/actions/runs/11096198234/job/30835784505?pr=3595#step:2:496
    git submodule sync is the answer ?
    (No tried)

    Any help on were I am going wrong would be great.

    Regards,
    Brendan

  • Maybe something went wrong when cloning and it would help to git clone your BangleApps fork to your machine again?

  • I guess you didn't clone the submodules?

    If so, you should be able to clone them still using the following commands:

    git submodule init
    git submodule update
    

    See here for more info:
    https://stackoverflow.com/questions/3796927/how-do-i-git-clone-a-repo-including-its-submodules

  • git clone your BangleApps fork to your machine again

    Tried that, same blank webtools directory - but I am think I am missing a hint on how to use git
    From my local fork - webtools links to https://github.com/espruino/EspruinoWebTools/tree/1c0a49065bbe7c74c40edcdcd1ddbb840483a283

  • I guess you didn't clone the submodules?

    Yep - I am thinking that it - thanks for the hint.
    I will test tonight and maybe put on note on the wiki page

  • Yes, it'll be cloning the submodules that's needed.

    Just a quick note though: the sanitytest script is run automatically by GitHub for each commit, so if you look at https://github.com/espruino/BangleApps, right above the file list and below the Go to file search box you'll see a green tick or red cross and you can click that for more info on the result.

    Same thing should work on your GitHub repository if you've forked BangleApps so it's a nice easy test

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

./bin/sanitycheck.js How to use ?

Posted by Avatar for user159054 @user159054

Actions