Error: missing module 'bonescript'

BBB information:

> Linux BeagleBone 5.10.168-ti-r77 #1bullseye SMP PREEMPT Wed Feb 28 21:05:58 UTC 2024 armv7l GNU/Linux
> Debian GNU/Linus 11.9 (bullseye)
> Debian Bullseye IoT Image 2023-09-02

When I try to run the example in Beagle Bone code workspace or from a command prompt. I get the following error;

> internal/modules/cjs/loader.js:818
>   throw err;
>   ^
> Error: Cannot find module 'bonescript'
> Require stack:
> - /opt/vsx-examples/examples/BeagleBone/Black/
>     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:74:18)
>     at Object.<anonymous> (/opt/vsx-examples/examples/BeagleBone/Black/
>     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: [ '/opt/vsx-examples/examples/BeagleBone/Black/' ]
> }

Read the following posts:

  1. Can not find module 'bonescript'
  2. Error: Cannot find module 'bonescript'

Post (1) had no replies or solution
Post (2) had some sort of solution but I do not understand it.

Also read several other posts but the majority did not apply or dealt with specific coding errors.

The development of the bonescript project has stopped.


(A semi-rhetorical question) Why are the examples still be shipped with the new images.? :disappointed:

Giving end users examples that he/she can not ever use, does not make sense to me.

Having the bonescript examples in vsCode leads one to assume that they are valid and can be run on the BBB.