TypeError: require(âŚ).load is not a function
at Object. (/home/user/lw/LaserWeb4/node_modules/lw.comm-server/config.js:1:81)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensionsâŚjs (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (/home/user/lw/LaserWeb4/node_modules/lw.comm-server/server.js:28:16)
at Module._compile (internal/modules/cjs/loader.js:689:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! laserweb@4.0.996 start-server: node node_modules/lw.comm-server/server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the laserweb@4.0.996 start-server script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Thanks for your answer. It is the first time that I try and play with node.
Unfortunately this did not help. The dotnet was already installed in the node_modules.
First let me state that I do not have a clue yet about node and its build system.
To get everything working, I replaced in: node_modules/lw.comm-server/config.js, the first line to be: require(âdotenvâ).config()
No idea if this is a proper solutions. But it got me a step further.
Furthermore, I also had to issue the following command
npm install --save object.omit
@SirGeekALot honestly do we want that our screw drivers operate only when wifi/internet is available ?
I loved tools because you can use them in the wild.
Net connected tool is NOT a tool
@anon57870006npm install is âgoing to the store to buy the screwdriverâ in your analogy. In any case not clear how snarking about choice of tool is helpful here? This is the LaserWeb category, and if you donât like it just let it be perhaps.
Possibly @cprezzi is more able to help here, since itâs his commit referenced.
@Kire_Pudsje Unfortunately itâs not so easy to get the whole build chain working. Do you realy need to compile LW yourself or would it be an option to just use the precompiled installers?
One of the last changes on lw.comm-server was upgrading node serialport 4.0.7 to 6.2.2, which could potentialy make problems if the frontend still wants to use version 4.
Could you please check the version of serialport (in your node_modules folder and if you also have a different version globaly installed)?
If you was able to run lw.comm-server itself, then you can also try to manually copy that folder to the node_modules forlder in LaserWeb4.
@Kire_Pudsje Thanks for that hint. I will check and update accordingly.
When I build LW4, I usually first make sure that I can run lw.comm-server (master) and LaserWeb4 (dev-es6) manually and they can connect (via websocket).
Then I build the webpack of LW4 and copy it into the app folder of lw.comm-server. This is the embeded frontend that can be called via webbrowser.
The last step is to merge the changes to the electron_bundler branch and build the electron app.
For all these steps there are scripts in the corresponding package.json files. The script ânightlywindowsâ in the electron_bundler branch of lw.comm-server shows the whole build chain.
Hope this will help you for building. I would be happy if I had someone who cares about building the installers (as Jorge Robles was responsible for that part and he doesnât have much time lately).