Hi, I’m trying to build a Desktop app (Windows) using the Electron procedure. I have installed latest node package, put in an icon(512) and I have set the dimensions I want my app to run with. When I try to run the app using Electron, a black window appears briefly and that is it? An electron folder appears in my NSB projects folder with what looks to be all the relevent files and information. How do I get this to run?
Thanks
Will.
However there is another version of npm avaliable but I don’t think it’s included in the latest LTS version : Latest npm version: 8.5.3 https://www.npmjs.com/package/npm
@AppStudioSupport
Yes, from the view log window if I was to copy to clipboard it would be around 2 pages of A4 of what I have shown in my previous post.
2022-03-07 11:03:31,757 - IDEController - INFO - npm: config set scripts-prepend-node-path auto
2022-03-07 11:03:31,757 - IDEController - INFO - npmPath: C:\Program Files\NSB AppStudio\node\bin\node, C:\Program Files\NSB AppStudio\node\node_modules\npm\bin\npm-cli.js
2022-03-07 11:03:33,132 - IDEController - INFO - TypeError: Class extends value undefined is not a constructor or null
Thanks for doing that for me I had a look at the problems the folks were having on StackOverflow and I did do an uninstall and then reinstalled node.Same problem. I then tried to install of previous versions (node 12.14.1 and 16.13.2) but unfortunately ended up with the same result. I think I’m going to have to put this on the back burner for now as it’s for myself anyway. Just one thought, could it be the node.exe file needs updating in the AppStudio node bin?
Thanks
Will.
One more question, do I use the current Electron Builder i.e 22.14.13 or would I have to use an older one that was origeonally asociated with the above mentioned node and npm versions?
Thanks.
Just a quick update, I after running with node v 16.13.1, I no longer get any mention of node error in the log file (Checked from log folder not window in app studio) Still doesn’t run though. It 's difficult to find what version number of electron builder to use. It can be narrowed down to several versions even though there is only a month between Node 16.13.1 and Node 16.13.2.
Dates here Previous Releases | Node.js and
Electron builder dates here https://www.npmjs.com/package/electron-builder?activeTab=versions. I tried running with all of them, no node error like before but still doesn’t run.
Finally got there, you have to use node-v16.13.1 which has to match the .exe file within app studio and you have to use the following dependencies which I’m assuming are also within app studio (Even though node-v16.3.1 comes with it’s own npm version)
Dependencies used are
I would probably be able to do that with a new project now. But my problems started with this project because I tried to make an electron app with an early version of node that wasn’t compatatable to what NSB had in it’s folders. I then installed the latest version of node which didn’t work with NSB either. The only time it ran was when I installed the same version of node as the .exe file being used in NSB. It runs with all sorts of errors (includind syntax in my code acording to electron).
Although not really solved, I think I’m going to leave this topic as concluded now. I think the message is this: Before running Electron, make sure the version of node installed on your machine is the same as what’s being used within App Studio. Also if you do need to update node to match App Studio version, a later version of npm may come with the download. Don’t change the dependencies in App Studio to match the later version of npm. (Keep build version the same as well) It wasn’t all gloom though, because this app was for myself, I just used the Chrome install to make a desktop app. I have to say although it has its limitations (Browser Related) I’m really impressed as the functions and controls are very responsive and very fast. I just swapped out the App Studio desktop icon for one of my own windows desktop launcher icons and I used a pop-up window resizer from chrome extensions. Easy to send to another device to install to by just using the share page option.