How do i test my Electron Apps here

javascript

#1

I want to test my Electron Desktop Apps here… And i cant do it for some reason when i run npm start it gives me this error. Please help @cloud9 .

Response would be appreciated

                                                             Sincerely Amanuel

#2

what is the error that you are getting?

The command that it has you run npm install && npm start should be split up and one ran with sudo like so,

sudo npm install 
npm start

Seems to run for me.


#3

Hi @amanuelhi,

Thank you for writing in. Can you post the actual error?

Also, unless I’m missing something, Electron is a desktop development library, and even though you may be able to write the javascript here, you won’t be able to run it as Cloud9 workspaces don’t have an associated display.

In order to test Electron, I think you can do the following:

  • Download the source on your desktop
  • Do npm install and make sure you can start electron
  • Give the BrowserWindow the url for your Cloud9 workspace application
  • Run your client application on Cloud9.

You can use Git to sync, or try https://c9.io/blog/dropbox-on-cloud9/

Hope this helps.

Regards,
​Mutahhir


Why Doesn't Electron Work in Cloud9?
#4

@jms1989 and @mutahhir the problem here is not when i run

sudo npm install

Its when i run

npm start

I dont know why but i get this error:

npm ERR! Linux 4.2.0-c9
npm ERR! argv "/home/ubuntu/.nvm/versions/node/v4.2.4/bin/node" "/home/ubuntu/.nvm/versions/node/v4.2.4/bin/npm" "start"
npm ERR! node v4.2.4
npm ERR! npm  v2.14.12
npm ERR! path /home/ubuntu/workspace/ElectronOSTest/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open

npm ERR! enoent ENOENT: no such file or directory, open '/home/ubuntu/workspace/ElectronOSTest/package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! Please include the following file with any support request:
npm ERR!     /home/ubuntu/workspace/ElectronOSTest/npm-debug.log

If you want to work it out together here is my cloud9 workspace:
https://ide.c9.io/amanuel2/electron

Thanks so much for helping!