Coder Social home page Coder Social logo

electron / electron-quick-start Goto Github PK

View Code? Open in Web Editor NEW
10.9K 10.9K 4.9K 1.13 MB

Clone to try a simple Electron app

Home Page: https://electronjs.org/docs/latest/tutorial/quick-start

License: Creative Commons Zero v1.0 Universal

HTML 21.60% JavaScript 75.86% CSS 2.54%

electron-quick-start's Introduction

electron-quick-start

Clone and run for a quick way to see Electron in action.

This is a minimal Electron application based on the Quick Start Guide within the Electron documentation.

A basic Electron application needs just these files:

  • package.json - Points to the app's main file and lists its details and dependencies.
  • main.js - Starts the app and creates a browser window to render HTML. This is the app's main process.
  • index.html - A web page to render. This is the app's renderer process.
  • preload.js - A content script that runs before the renderer process loads.

You can learn more about each of these components in depth within the Tutorial.

To Use

To clone and run this repository you'll need Git and Node.js (which comes with npm) installed on your computer. From your command line:

# Clone this repository
git clone https://github.com/electron/electron-quick-start
# Go into the repository
cd electron-quick-start
# Install dependencies
npm install
# Run the app
npm start

Note: If you're using Linux Bash for Windows, see this guide or use node from the command prompt.

Resources for Learning Electron

License

CC0 1.0 (Public Domain)

electron-quick-start's People

Contributors

auchenberg avatar bratsos avatar chankruze avatar ckerr avatar codebytere avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar dsanders11 avatar erickzhao avatar haacked avatar icodeforbananas avatar izuzak avatar jlord avatar kevinsawicki avatar kilian avatar louis993546 avatar malept avatar marshallofsound avatar nornagon avatar richienb avatar sahildua2305 avatar sebastianschmidt avatar shiftkey avatar steevedroz avatar tatzyr avatar tcyrus avatar vhashimotoo avatar victorovento avatar zeke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

electron-quick-start's Issues

ubuntu 'npm start' fail

npm install is ok, and npm start is fail, 'npm-debug.log' is follow:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 silly lifecycle [email protected]~prestart: no script for prestart, continuing
7 info lifecycle [email protected]~start: [email protected]
8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~start: PATH: /usr/share/npm/bin/node-gyp-bin:/root/electron/electron-quick-start/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
10 verbose lifecycle [email protected]~start: CWD: /root/electron/electron-quick-start
11 silly lifecycle [email protected]~start: Args: [ '-c', 'electron .' ]
12 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
13 info lifecycle [email protected]~start: Failed to exec start script
14 verbose stack Error: [email protected] start: `electron .`
14 verbose stack Exit status 1
14 verbose stack       at EventEmitter.<anonymous> (/usr/share/npm/lib/utils/lifecycle.js:232:16)
14 verbose stack       at emitTwo (events.js:87:13)
14 verbose stack       at EventEmitter.emit (events.js:172:7)
14 verbose stack       at ChildProcess.<anonymous> (/usr/share/npm/lib/utils/spawn.js:24:14)
14 verbose stack       at emitTwo (events.js:87:13)
14 verbose stack       at ChildProcess.emit (events.js:172:7)
14 verbose stack       at maybeClose (internal/child_process.js:821:16)
14 verbose stack       at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid [email protected]
16 verbose cwd /root/electron/electron-quick-start
17 error Linux 3.13.0-43-generic
18 error argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
19 error node v4.2.6
20 error npm  v3.5.2
21 error code ELIFECYCLE
22 error [email protected] start: `electron .`
22 error Exit status 1
23 error Failed at the [email protected] start script 'electron .'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the electron-quick-start package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     electron .
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs electron-quick-start
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls electron-quick-start
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

Ubuntu 14.04 quick-start failure

On Ubuntu 14.04, I did:

$ sudo apt-get install npm
$ git clone https://github.com/electron/electron-quick-start
$ cd electron-quick-start
$ npm install && npm start

And eventually got:

...
npm http GET https://registry.npmjs.org/lodash/-/lodash-4.15.0.tgz
npm http 200 https://registry.npmjs.org/lodash/-/lodash-4.15.0.tgz

[email protected] postinstall /home/1000072457/work/electron/electron-quick-start/node_modules/electron
node install.js

sh: 1: node: not found
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! weird error 127
npm ERR! not ok code 0
$

I don't know if this is from something I preinstalled or not. I tried 'sudo apt-get install node', but got the same error.

npm start does not work | electron command displays nothing | Exit status 3221225781 => (Solution)

Just in case this helps anyone. Make sure you have the Visual C++ Redistributable for Visual Studio 2015 for your specific platform. If you don't you may get this errors in the npm-debug.log file when trying to run npm start.

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\Propietario-1\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 silly lifecycle [email protected]~prestart: no script for prestart, continuing
7 info lifecycle [email protected]~start: [email protected]
8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~start: PATH: C:\Users\Propietario-1\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;C:\Users\Propietario-1\Documents\GitHub\electron-quick-start-master\node_modules\.bin;C:\Program Files\nodejs;%SystemRoot%\system32\WindowsPowerShell\v1.0\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\wamp\bin\php\php5.3.13;C:\wamp\www\phalcon-devtools-master;C:\Python27;C:\Python27\Scripts;C:\OpenSSL-Win32\bin;C:\Git\cmd;C:\Program Files (x86)\Skype\Phone\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\HashiCorp\Vagrant\bin;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\nodejs\;C:\Program Files (x86)\JSONBuddy;C:\Users\Propietario-1\AppData\Local\atom\bin;C:\Program Files\Docker Toolbox;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\Propietario-1\AppData\Roaming\npm;C:\Program Files\nodejs\node
10 verbose lifecycle [email protected]~start: CWD: C:\Users\Propietario-1\Documents\GitHub\electron-quick-start-master
11 silly lifecycle [email protected]~start: Args: [ '/d /s /c', 'electron main.js' ]
12 silly lifecycle [email protected]~start: Returned: code: 3221225781  signal: null
13 info lifecycle [email protected]~start: Failed to exec start script
14 verbose stack Error: [email protected] start: `electron main.js`
14 verbose stack Exit status 3221225781
14 verbose stack     at EventEmitter.<anonymous> (C:\Users\Propietario-1\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:245:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (C:\Users\Propietario-1\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:24:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:850:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
15 verbose pkgid [email protected]
16 verbose cwd C:\Users\Propietario-1\Documents\GitHub\electron-quick-start-master
17 error Windows_NT 6.1.7601
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Propietario-1\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
19 error node v6.1.0
20 error npm  v3.9.0
21 error code ELIFECYCLE
22 error [email protected] start: `electron main.js`
22 error Exit status 3221225781
23 error Failed at the [email protected] start script 'electron main.js'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the electron-quick-start package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     electron main.js
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs electron-quick-start
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls electron-quick-start
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

After installing the problem was solved. I found the solution in this link.

package.json scripts start command should be "electron ."

I believe this line in package.json:

"start": "electron main.js"

Should be changed to:

"start": "electron ."

the reason being that currently any calls to app.getName(), app.getAppPath(), app.getPath(), etc. would return "Electron" as the application name instead of "electron-quick-start".

I know those app methods are not used in this quick start example. However, it might help anyone using this as a template for other projects that do.

Invalid install target version in package.json

Performing the following steps from the README:

git clone https://github.com/atom/electron-quick-start
cd electron-quick-start
npm install

Gives me:

npm http GET https://registry.npmjs.org/electron-prebuilt
npm http 304 https://registry.npmjs.org/electron-prebuilt
npm ERR! Error: No compatible version found: electron-prebuilt@'^0.36.0'
npm ERR! Valid install targets:
npm ERR! ["0.24.0","0.25.0","0.25.1","0.25.1-1","0.25.2","0.25.2-1","0.25.3","0.25.3-1","0.25.3-2","0.26.0","0.26.1","0.27.0","0.27.1","0.27.2","0.27.3","0.28.0","0.28.1","0.28.2","0.28.3","0.29.0","0.29.1","0.29.2","0.30.0","0.30.1","0.30.2","0.30.3","0.30.4","0.30.5","0.31.0","0.30.6","0.31.1","0.31.2","0.32.0","0.32.1","0.32.2","0.32.3","0.33.0","0.33.1","0.30.7","0.33.2","0.30.8","0.33.3","0.33.4","0.33.5","0.33.6","0.33.7","0.33.8","0.33.9","0.34.0","0.34.1","0.34.2","0.34.3","0.35.0","0.35.1","0.34.4","0.34.5","0.35.2","0.35.3","0.35.4","0.36.0","0.36.1","0.36.2","0.35.5","0.36.3","0.35.6","0.36.4","0.36.5","0.36.6","0.36.7","0.36.8"]
npm ERR!     at installTargetsError (/usr/local/lib/node_modules/npm/lib/cache.js:719:10)
npm ERR!     at /usr/local/lib/node_modules/npm/lib/cache.js:638:10
npm ERR!     at saved (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:142:7)
npm ERR!     at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:133:7
npm ERR!     at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <[email protected]>

npm ERR! System Darwin 15.0.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/robinkeller/Projects/cef/electron-quick-start
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/robinkeller/Projects/cef/electron-quick-start/npm-debug.log
npm ERR! not ok code 0

failed with electrin node install.js script: Error: read ECONNRESET

I am trying to install electron -quick-start on linux 32 bit system but getting following error.

[email protected] postinstall /home/chanakya/Desktop/Projects/Imran/Node-UI/Other/electron-quick-start-master/node_modules/electron
node install.js

Downloading electron-v1.3.3-linux-ia32.zip
Error: read ECONNRESET
/home/chanakya/Desktop/Projects/Imran/Node-UI/Other/electron-quick-start-master/node_modules/electron/install.js:22
throw err
^
Error: read ECONNRESET
at exports._errnoException (util.js:746:11)
at TCP.onread (net.js:559:26)
npm ERR! Linux 4.0.0-kali1-686-pae
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "electron" "--save-dev"
npm ERR! node v0.12.7
npm ERR! npm v2.14.2
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node install.js'.
npm ERR! This is most likely a problem with the electron package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls electron
npm ERR! There is likely additional logging output above.

Typescript version ?

Would be nice with a typescript 2.0 version of the quick start (and typings for the electron project if they are not already there in the npms).

update need

(electron) loadUrl is deprecated. Use loadURL instead

Remote audio stops playing after a few minutes

I'm trying to create a Podcast Manager using Electron (you can find it here - it's pretty bare for now though)

I've manged to get far ahead to test the playback, but I've noticed that on long podcasts (about 1h long) the playback stops after a few minutes, with no way to recover except an app restart / page refresh.

No errors are shown in the console. Not sure what to do. I know that this is a bug / security feature in Chromium something about serving audio from the same domain as the app, but this node.js is a bit new to me and it's hard for me to wrap my head around it.

Can you give some tips on how to fix this?

I have found the issue in Chromium. It appears that this bug is still present. Is there a way to work around this?

This has been copied over from discus.

Sorry but there was no answer provided there...

Uncaught Error: Bootstrap's JavaScript requires jQuery

My page is like that (left & right arrows are not shown):
html
head
head
body
script src="js/common/jquery-2.1.4.min.js"/script
script src="js/common/bootstrap.min.js"/script
body
html

npm install && npm start - starts blank page with console error (Uncaught Error: Bootstrap's JavaScript requires jQuery).

To make page work you need to have jquery script both in head & body tags what is strage.

Mac OS X Lion: doesn’t seem to do anything at all

Hi! :)

I’ve followed the 3 steps in the To Use section. Everything seems to have run, but nothing (visible) has happened:

    ~/tmp ɀ  git clone https://github.com/atom/electron-quick-start
Cloning into 'electron-quick-start'...
remote: Counting objects: 96, done.
remote: Total 96 (delta 0), reused 0 (delta 0), pack-reused 95
Unpacking objects: 100% (96/96), done.
Checking connectivity... done.
    ~/tmp ɀ  cd electron-quick-start
    ~/tmp/electron-quick-start ɀ  npm install && npm start
/
> [email protected] postinstall /Users/vladgurdiga/tmp/electron-quick-start/node_modules/electron-prebuilt
> node install.js

Downloading electron-v0.36.3-darwin-x64.zip
[============================================>] 100.0% of 39.49 MB (406.12 kB/s)

[email protected] node_modules/electron-prebuilt
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

> [email protected] start /Users/vladgurdiga/tmp/electron-quick-start
> electron main.js

    ~/tmp/electron-quick-start ɀ  
    ~/tmp/electron-quick-start ɀ  npm start

> [email protected] start /Users/vladgurdiga/tmp/electron-quick-start
> electron main.js

    ~/tmp/electron-quick-start ɀ  l 
total 28K
drwxr-xr-x 12 vladgurdiga staff  408 2016-01-09 10:42:09 .git/
drwxr-xr-x  4 vladgurdiga staff  136 2016-01-09 10:42:35 node_modules/
-rw-r--r--  1 vladgurdiga staff   13 2016-01-09 10:42:09 .gitignore
-rw-r--r--  1 vladgurdiga staff 6.4K 2016-01-09 10:42:09 LICENSE.md
-rw-r--r--  1 vladgurdiga staff 1.3K 2016-01-09 10:42:09 README.md
-rw-r--r--  1 vladgurdiga staff  378 2016-01-09 10:42:09 index.html
-rw-r--r--  1 vladgurdiga staff 1.6K 2016-01-09 10:42:09 main.js
-rw-r--r--  1 vladgurdiga staff  629 2016-01-09 10:42:09 package.json
    ~/tmp/electron-quick-start ɀ  electron main.js
    ~/tmp/electron-quick-start ɀ  electron --help
    ~/tmp/electron-quick-start ɀ  echo $?
0
    ~/tmp/electron-quick-start ɀ  uname -a
Darwin Vlads-MacBook-Air.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64 i386 MacBookAir4,2 Darwin
    ~/tmp/electron-quick-start ɀ  

I realize I’m using an ancient version of OS X 😊 and now I’m wondering if I can run this thing on it at all. Or, is there anything else I can try, or do I need to maybe add some more relevant information to help debug this. I totally want to do get this working. 👷

npm start give errors

If I run 'npm install && npm start' I get error.

Content of npm-debug.log is:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info prestart [email protected]
6 info start [email protected]
7 verbose unsafe-perm in lifecycle true
8 info [email protected] Failed to exec start script
9 verbose stack Error: [email protected] start: electron main.js
9 verbose stack Exit status 1
9 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:214:16)
9 verbose stack at emitTwo (events.js:87:13)
9 verbose stack at EventEmitter.emit (events.js:172:7)
9 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
9 verbose stack at emitTwo (events.js:87:13)
9 verbose stack at ChildProcess.emit (events.js:172:7)
9 verbose stack at maybeClose (internal/child_process.js:818:16)
9 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
10 verbose pkgid [email protected]
11 verbose cwd /home/dev/WebstormProjects/electron-quick-start
12 error Linux 2.6.32-504.8.1.el6.x86_64
13 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
14 error node v4.2.3
15 error npm v2.14.7
16 error code ELIFECYCLE
17 error [email protected] start: electron main.js
17 error Exit status 1
18 error Failed at the [email protected] start script 'electron main.js'.
18 error This is most likely a problem with the electron-quick-start package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error electron main.js
18 error You can get their info via:
18 error npm owner ls electron-quick-start
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

Tried various versions of node 4.x and 5.x and 0.12.x. Same issue.
Running on Centos 6.6

Electron ..Not able to package for a windows from a Mac?

Trying to package a windows version from a mac . Have easily packaged for darwin (mac) works perfectly but when trying to package --platform=all --arch=all doesn't work and ill attach a screen shot of what it comes up when trying to package for Windows.

screen shot 2016-05-23 at 12 09 40 pm
screen shot 2016-05-23 at 12 09 14 pm

Permission Issue for electron execution

My entire project is setup on linux distro. Previously it was working fine. Recently i moved entire file structure to disk mounted with widows file system now i am accessing project from there into linux. But after installing dependencies and running command $npm start into project root folder i am getting
Permission denied issue. below mentioned is the error details.

[email protected] start /media/chanakya/B4CCD876CCD83478/Backup/KaliLinux/Projects/Imran/Node-UI/MobiMe_extremely_small
electron .

sh: 1: electron: Permission denied

npm ERR! Linux 4.0.0-kali1-686-pae
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v0.12.7
npm ERR! npm v2.14.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: electron .
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the [email protected] start script 'electron .'.
npm ERR! This is most likely a problem with the electron-quick-start package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! electron .
npm ERR! You can get their info via:
npm ERR! npm owner ls electron-quick-start
npm ERR! There is likely additional logging output above.

I appreciate any help in this regards.

electron package issue

Electron - quick - start in the macBook Pro package, package, how to change the default application icon in the json file.Worried, help to prompt, thank you very much.

Start error on windows 10

Windows_NT 10.0.10586 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start" npm ERR! node v6.1.0 npm ERR! npm v3.8.6 npm ERR! code ELIFECYCLE npm ERR! [email protected] start:electron .`
npm ERR! Exit status 3221225781
npm ERR!
npm ERR! Failed at the [email protected] start script 'electron .'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron-quick-start package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! electron .
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs electron-quick-start
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls electron-quick-start
npm ERR! There is likely additional logging output above.

I have tried ever thing that I cloud think of: installing electron-prebuilt locally/globally updating Nodejs, and it doesn't seems to work.

Error trying electron-quick-start on RPI2

Hi,
Tried to Install electron-quick-start on a Raspberry pi 2, Raspbian
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 8.0 (jessie)
Release: 8.0
Codename: jessie

results is:

[email protected] start /home/pi/MagicMirror/electron-quick-start
electron main.js

npm ERR! Linux 4.1.19-v7+
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” "start"
npm ERR! node v6.1.0
npm ERR! npm v3.8.6
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: electron main.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script ‘electron main.js’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron-quick-start package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! electron main.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs electron-quick-start
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls electron-quick-start
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/MagicMirror/electron-quick-start/npm-debug.log

pi@mirror2:/MagicMirror/electron-quick-start $ cat /home/pi/MagicMirror/electron-quick-start/npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/local/bin/node’, ‘/usr/local/bin/npm’, ‘start’ ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ ‘prestart’, ‘start’, ‘poststart’ ]
5 info lifecycle [email protected]
prestart: [email protected]
6 silly lifecycle [email protected]prestart: no script for prestart, continuing
7 info lifecycle [email protected]
start: [email protected]
8 verbose lifecycle [email protected]start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]
start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/home/pi/MagicMirror/electron-quick-start/node_modules/.bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
10 verbose lifecycle [email protected]start: CWD: /home/pi/MagicMirror/electron-quick-start
11 silly lifecycle [email protected]
start: Args: [ ‘-c’, ‘electron main.js’ ]
12 silly lifecycle [email protected]start: Returned: code: 1 signal: null
13 info lifecycle [email protected]
start: Failed to exec start script
14 verbose stack Error: [email protected] start: electron main.js
14 verbose stack Exit status 1
14 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:239:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:850:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
15 verbose pkgid [email protected]
16 verbose cwd /home/pi/MagicMirror/electron-quick-start
17 error Linux 4.1.19-v7+
18 error argv “/usr/local/bin/node” “/usr/local/bin/npm” "start"
19 error node v6.1.0
20 error npm v3.8.6
21 error code ELIFECYCLE
22 error [email protected] start: electron main.js
22 error Exit status 1
23 error Failed at the [email protected] start script ‘electron main.js’.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the electron-quick-start package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error electron main.js
23 error You can get information on how to open an issue for this project with:
23 error npm bugs electron-quick-start
23 error Or if that isn’t available, you can get their info via:
23 error npm owner ls electron-quick-start
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

Any idea ?

thank you....

file permissions

why do I need to type my password when saving files in sublime text?

on macOs

problems getting started on mac os x

Hi, I'm having trouble with the quickstart. Prior to this I did a brew update and brew upgrade npm.

I'm new to node/npm.

Any suggestions as to what is going wrong here?

$ npm install && npm start
npm http GET https://registry.npmjs.org/electron-prebuilt
npm http 304 https://registry.npmjs.org/electron-prebuilt
npm ERR! Error: No compatible version found: electron-prebuilt@'^0.37.8'
npm ERR! Valid install targets:
npm ERR! ["0.24.0","0.25.0","0.25.1","0.25.1-1","0.25.2","0.25.2-1","0.25.3","0.25.3-1","0.25.3-2","0.26.0","0.26.1","0.27.0","0.27.1","0.27.2","0.27.3","0.28.0","0.28.1","0.28.2","0.28.3","0.29.0","0.29.1","0.29.2","0.30.0","0.30.1","0.30.2","0.30.3","0.30.4","0.30.5","0.31.0","0.30.6","0.31.1","0.31.2","0.32.0","0.32.1","0.32.2","0.32.3","0.33.0","0.33.1","0.30.7","0.33.2","0.30.8","0.33.3","0.33.4","0.33.5","0.33.6","0.33.7","0.33.8","0.33.9","0.34.0","0.34.1","0.34.2","0.34.3","0.35.0","0.35.1","0.34.4","0.34.5","0.35.2","0.35.3","0.35.4","0.36.0","0.36.1","0.36.2","0.35.5","0.36.3","0.35.6","0.36.4","0.36.5","0.36.6","0.36.7","0.36.8","0.36.9","0.36.10","0.36.11","0.37.0","0.37.1","0.37.2","0.36.12","0.37.3","0.37.4","0.37.5","0.37.6","0.37.7","0.37.8"]
npm ERR!     at installTargetsError (/usr/local/lib/node_modules/npm/lib/cache.js:685:10)
npm ERR!     at /usr/local/lib/node_modules/npm/lib/cache.js:607:10
npm ERR!     at saved (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:138:7)
npm ERR!     at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <[email protected]>

npm ERR! System Darwin 15.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/cpg/work/160508-testing-electron/electron-quick-start
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/cpg/work/160508-testing-electron/electron-quick-start/npm-debug.log
npm ERR! not ok code 0

and the details are

$ cat /Users/cpg/work/160508-testing-electron/electron-quick-start/npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'install' ]
2 info using [email protected]
3 info using [email protected]
4 verbose read json /Users/cpg/work/160508-testing-electron/electron-quick-start/package.json
5 verbose readDependencies using package.json deps
6 verbose install where, deps [ '/Users/cpg/work/160508-testing-electron/electron-quick-start',
6 verbose install   [ 'electron-prebuilt' ] ]
7 verbose from cache /Users/cpg/work/160508-testing-electron/electron-quick-start/package.json
8 info preinstall [email protected]
9 verbose from cache /Users/cpg/work/160508-testing-electron/electron-quick-start/package.json
10 verbose readDependencies using package.json deps
11 verbose cache add [ 'electron-prebuilt@^0.37.8', null ]
12 verbose cache add name=undefined spec="electron-prebuilt@^0.37.8" args=["electron-prebuilt@^0.37.8",null]
13 verbose parsed url { protocol: null,
13 verbose parsed url   slashes: null,
13 verbose parsed url   auth: null,
13 verbose parsed url   host: null,
13 verbose parsed url   port: null,
13 verbose parsed url   hostname: null,
13 verbose parsed url   hash: null,
13 verbose parsed url   search: null,
13 verbose parsed url   query: null,
13 verbose parsed url   pathname: 'electron-prebuilt@^0.37.8',
13 verbose parsed url   path: 'electron-prebuilt@^0.37.8',
13 verbose parsed url   href: 'electron-prebuilt@^0.37.8' }
14 verbose cache add name="electron-prebuilt" spec="^0.37.8" args=["electron-prebuilt","^0.37.8"]
15 verbose parsed url { protocol: null,
15 verbose parsed url   slashes: null,
15 verbose parsed url   auth: null,
15 verbose parsed url   host: null,
15 verbose parsed url   port: null,
15 verbose parsed url   hostname: null,
15 verbose parsed url   hash: null,
15 verbose parsed url   search: null,
15 verbose parsed url   query: null,
15 verbose parsed url   pathname: '^0.37.8',
15 verbose parsed url   path: '^0.37.8',
15 verbose parsed url   href: '^0.37.8' }
16 verbose addNamed [ 'electron-prebuilt', '^0.37.8' ]
17 verbose addNamed [ null, null ]
18 silly lockFile b4ec6c31-electron-prebuilt-0-37-8 electron-prebuilt@^0.37.8
19 verbose lock electron-prebuilt@^0.37.8 /Users/cpg/.npm/b4ec6c31-electron-prebuilt-0-37-8.lock
20 info addNameTag [ 'electron-prebuilt', '^0.37.8' ]
21 verbose url raw electron-prebuilt
22 verbose url resolving [ 'https://registry.npmjs.org/', './electron-prebuilt' ]
23 verbose url resolved https://registry.npmjs.org/electron-prebuilt
24 info trying registry request attempt 1 at 10:24:48
25 verbose etag "3DIBHBR4X0OIT00V4DGTI8X2C"
26 http GET https://registry.npmjs.org/electron-prebuilt
27 http 304 https://registry.npmjs.org/electron-prebuilt
28 silly registry.get cb [ 304,
28 silly registry.get   { date: 'Sun, 08 May 2016 17:24:35 GMT',
28 silly registry.get     via: '1.1 varnish',
28 silly registry.get     'cache-control': 'max-age=300',
28 silly registry.get     etag: '"3DIBHBR4X0OIT00V4DGTI8X2C"',
28 silly registry.get     age: '173',
28 silly registry.get     connection: 'keep-alive',
28 silly registry.get     'x-served-by': 'cache-dfw1831-DFW',
28 silly registry.get     'x-cache': 'HIT',
28 silly registry.get     'x-cache-hits': '1',
28 silly registry.get     'x-timer': 'S1462728275.635401,VS0,VE0',
28 silly registry.get     vary: 'Accept-Encoding' } ]
29 verbose etag electron-prebuilt from cache
30 silly lockFile b4ec6c31-electron-prebuilt-0-37-8 electron-prebuilt@^0.37.8
31 silly lockFile b4ec6c31-electron-prebuilt-0-37-8 electron-prebuilt@^0.37.8
32 error Error: No compatible version found: electron-prebuilt@'^0.37.8'
32 error Valid install targets:
32 error ["0.24.0","0.25.0","0.25.1","0.25.1-1","0.25.2","0.25.2-1","0.25.3","0.25.3-1","0.25.3-2","0.26.0","0.26.1","0.27.0","0.27.1","0.27.2","0.27.3","0.28.0","0.28.1","0.28.2","0.28.3","0.29.0","0.29.1","0.29.2","0.30.0","0.30.1","0.30.2","0.30.3","0.30.4","0.30.5","0.31.0","0.30.6","0.31.1","0.31.2","0.32.0","0.32.1","0.32.2","0.32.3","0.33.0","0.33.1","0.30.7","0.33.2","0.30.8","0.33.3","0.33.4","0.33.5","0.33.6","0.33.7","0.33.8","0.33.9","0.34.0","0.34.1","0.34.2","0.34.3","0.35.0","0.35.1","0.34.4","0.34.5","0.35.2","0.35.3","0.35.4","0.36.0","0.36.1","0.36.2","0.35.5","0.36.3","0.35.6","0.36.4","0.36.5","0.36.6","0.36.7","0.36.8","0.36.9","0.36.10","0.36.11","0.37.0","0.37.1","0.37.2","0.36.12","0.37.3","0.37.4","0.37.5","0.37.6","0.37.7","0.37.8"]
32 error     at installTargetsError (/usr/local/lib/node_modules/npm/lib/cache.js:685:10)
32 error     at /usr/local/lib/node_modules/npm/lib/cache.js:607:10
32 error     at saved (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:138:7)
32 error     at Object.oncomplete (fs.js:107:15)
33 error If you need help, you may report this log at:
33 error     <http://github.com/isaacs/npm/issues>
33 error or email it to:
33 error     <[email protected]>
34 error System Darwin 15.4.0
35 error command "node" "/usr/local/bin/npm" "install"
36 error cwd /Users/cpg/work/160508-testing-electron/electron-quick-start
37 error node -v v0.10.5
38 error npm -v 1.2.18
39 verbose exit [ 1, true ]

start error on win10 x64

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "D:\\Server\\nodejs\\node.exe" "D:\\Server\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--verbose"
npm ERR! node v5.9.1
npm ERR! npm  v3.8.5
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron-prebuilt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs electron-prebuilt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls electron-prebuilt
npm ERR! There is likely additional logging output above.
npm verb exit [ 1, true ]

License conflict

The README.md says that this project is available under the CC0 license, but LICENSE.md file is the CC1.0-Universal license.

Can either the license or the text in README.md be fixed?

Error: self signed certificate in certificate chain

After checking out this repository and running: npm install, I'm getting the following error message:

Error: self signed certificate in certificate chain
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/Cellar/node/4.2.1/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v4.2.1
npm ERR! npm  v3.3.9
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node install.js'.
npm ERR! This is most likely a problem with the electron-prebuilt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node install.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls electron-prebuilt
npm ERR! There is likely additional logging output above.

I am running behind a corporate firewall that does MITM HTTP/HTTPS content filtering, which does inject its own certificate. However, I don't normally get this error when installing NPM packages, as I have the self-signed certificate marked as trusted on my machine, and I've also set the "cafile=/path/to/cert" and "strict-ssl=false" set in my ~/.npmrc file.

TypeError: Cannot read property 'on' of undefined

Ubuntu 16.04x64
Node 6.10

[email protected] start /home/cjdg/Escritorio/Electron/electron-quick-start
electron main.js

App threw an error when running [TypeError: Cannot read property 'on' of undefined]
A JavaScript error occurred in the main process
Uncaught Exception:
TypeError: Cannot read property 'on' of undefined
at Object. (/home/cjdg/Escritorio/Electron/electron-quick-start/main.js:33:4)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at loadApplicationPackage (/home/cjdg/Escritorio/Electron/electron-quick-start/node_modules/electron-prebuilt/dist/resources/default_app.asar/main.js:252:23)
at Object. (/home/cjdg/Escritorio/Electron/electron-quick-start/node_modules/electron-prebuilt/dist/resources/default_app.asar/main.js:292:5)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)

Electron main.js works, npm start does not

fs.js:549
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open '/Users/quantum/electron-quick-start/node_modules/electron-prebuilt/path.txt'
    at Error (native)
    at Object.fs.openSync (fs.js:549:18)
    at Object.fs.readFileSync (fs.js:397:15)
    at Object.<anonymous> (/Users/quantum/electron-quick-start/node_modules/electron-prebuilt/index.js:4:42)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
▀ ╢░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

npm ERR! Darwin 15.2.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v4.0.0
npm ERR! npm  v3.6.0
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `electron main.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'electron main.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron-quick-start package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     electron main.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs electron-quick-start
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls electron-quick-start
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:

npm start gives me that message.

Contrary to that output, there is no npm-debug.log file, and electron main.js DOES work. Just npm start does not.

npm start failed on Windows 10

npm start fails with this log-file (BTW, I habe installed Visual C++ Redistributable for Visual Studio 2015).

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Programme\nodejs\node.exe',
1 verbose cli 'C:\Programme\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info prestart [email protected]
6 info start [email protected]
7 verbose unsafe-perm in lifecycle true
8 info [email protected] Failed to exec start script
9 verbose stack Error: [email protected] start: electron main.js
9 verbose stack Exit status 3221225595
9 verbose stack at EventEmitter. (C:\Programme\nodejs\node_modules\npm\lib\utils\lifecycle.js:214:16)
9 verbose stack at emitTwo (events.js:87:13)
9 verbose stack at EventEmitter.emit (events.js:172:7)
9 verbose stack at ChildProcess. (C:\Programme\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
9 verbose stack at emitTwo (events.js:87:13)
9 verbose stack at ChildProcess.emit (events.js:172:7)
9 verbose stack at maybeClose (internal/child_process.js:818:16)
9 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
10 verbose pkgid [email protected]
11 verbose cwd C:\Users\Werner\electron-quick-start
12 error Windows_NT 10.0.10586
13 error argv "C:\Programme\nodejs\node.exe" "C:\Programme\nodejs\node_modules\npm\bin\npm-cli.js" "start"
14 error node v4.2.4
15 error npm v2.14.12
16 error code ELIFECYCLE
17 error [email protected] start: electron main.js
17 error Exit status 3221225595
18 error Failed at the [email protected] start script 'electron main.js'.
18 error This is most likely a problem with the electron-quick-start package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error electron main.js
18 error You can get their info via:
18 error npm owner ls electron-quick-start
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

Problems to run 'npm start'

I have some trouble to run 'npm start' after cloning and installing the 'electron-quick-start' project from Github.
I use a fresh Fedora Workstation Installation (fc24.x86_64) virtualized on VMware.

Please see the attached screen dump.

electron-quick-start-failure

I can't locate the missing lib file 'libXss.so.1'. Please help.

Thanks for your support.

Error using new api electron

When i try to run npm start after npm install i get this error:

App threw an error when running [TypeError: Cannot read property 'start' of undefined]

but if i change main.js to old api it works perfectly

/* const electron = require('electron'); */
const app = require('app');  // Module to control application life.
const BrowserWindow = require('browser-window');  // Module to create native browser window.

so i'm not sure if this new api works only for some node versions

Minor mistake on "Get started with Electron"

The README tells you to run npm install && npm start which is correct. But in the website it says npm install && npm run which is not correct (run vs start).

I tried to find the gh-pages branch for the website but I'm afraid it is not published in a github repository so I just came here and opened an issue :)

Quick Start does not run - Linux Mint

Just tonight, I cloned the Quick-Start project and it plain got an error when the main script started.

I didn't poke around too much, as I figured you want to know when a quick start isn't starting. Anyway happy to report or peek at settings if the cause is not obvious.

Thanks in advance, ... platypus

command replay

I was following the steps from the project readme:

  # Clone this repository
  $ git clone https://github.com/atom/electron-quick-start
  Cloning into 'electron-quick-start'...
  remote: Counting objects: 101, done.
  remote: Total 101 (delta 0), reused 0 (delta 0), pack-reused 101
  Receiving objects: 100% (101/101), 16.06 KiB | 0 bytes/s, done.
  Resolving deltas: 100% (49/49), done.
  Checking connectivity... done.

  # Go into the repository
  $  cd electron-quick-start
  $ pwd
   ~/sandbox/tmp/electron-quick-start

   # Install dependencies and run the app
   $ npm install && npm start

result

  > [email protected] start /mnt/data/home/projects/sandbox/tmp/electron-quick-start
  > electron main.js

  fs.js:439
    return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                   ^
  Error: ENOENT, no such file or directory '/mnt/data/home/projects/sandbox/tmp/electron-quick-start/node_modules/electron-prebuilt/path.txt'
      at Object.fs.openSync (fs.js:439:18)
      at Object.fs.readFileSync (fs.js:290:15)
      at Object.<anonymous> (/mnt/data/home/projects/sandbox/tmp/electron-quick-start/node_modules      /electron-prebuilt/index.js:4:42)
      at Module._compile (module.js:456:26)
      at Object.Module._extensions..js (module.js:474:10)
      at Module.load (module.js:356:32)
      at Function.Module._load (module.js:312:12)
      at Module.require (module.js:364:17)
      at require (module.js:380:17)
      at Object.<anonymous> (/mnt/data/home/projects/sandbox/tmp/electron-quick-start/node_modules      /electron-prebuilt/cli.js:3:16)

  npm ERR! Linux 3.19.0-32-generic
  npm ERR! argv "node" "/usr/bin/npm" "start"
  npm ERR! node v0.10.42
  npm ERR! npm  v2.14.19
  npm ERR! code ELIFECYCLE
  npm ERR! [email protected] start: `electron main.js`
  npm ERR! Exit status 8
  npm ERR! 
  npm ERR! Failed at the [email protected] start script 'electron main.js'.
  npm ERR! This is most likely a problem with the electron-quick-start package,
  npm ERR! not with npm itself.
  npm ERR! Tell the author that this fails on your system:
  npm ERR!     electron main.js
  npm ERR! You can get information on how to open an issue for this project with:
  npm ERR!     npm bugs electron-quick-start
  npm ERR! Or if that isn't available, you can get their info via:
  npm ERR! 
  npm ERR!     npm owner ls electron-quick-start
  npm ERR! There is likely additional logging output above.

  npm ERR! Please include the following file with any support request:
  npm ERR!     /mnt/data/home/projects/sandbox/tmp/electron-quick-start/npm-debug.log

Version info

  • git: v1.9.1
  • node: v0.10.42
  • npm: 2.14.19
  • electron: 0.4.1
  • linux: v 3.19.0-32-generic #37~14.04.1-Ubuntu SMP Thu Oct 22 09:41:40 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

debug log

   0 info it worked if it ends with ok
   1 verbose cli [ 'node', '/usr/bin/npm', 'start' ]
   2 info using [email protected]
   3 info using [email protected]
   4 verbose node symlink /usr/bin/node
   5 verbose run-script [ 'prestart', 'start', 'poststart' ]
   6 info prestart [email protected]
   7 info start [email protected]
   8 verbose unsafe-perm in lifecycle true
   9 info [email protected] Failed to exec start script
   10 verbose stack Error: [email protected] start: `electron main.js`
   10 verbose stack Exit status 8
   10 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:214:16)
   10 verbose stack     at EventEmitter.emit (events.js:98:17)
   10 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:24:14)
   10 verbose stack     at ChildProcess.emit (events.js:98:17)
   10 verbose stack     at maybeClose (child_process.js:766:16)
   10 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:833:5)
   11 verbose pkgid [email protected]
   12 verbose cwd /mnt/data/home/projects/sandbox/tmp/electron-quick-start
   13 error Linux 3.19.0-32-generic
   14 error argv "node" "/usr/bin/npm" "start"
   15 error node v0.10.42
   16 error npm  v2.14.19
   17 error code ELIFECYCLE
   18 error [email protected] start: `electron main.js`
   18 error **Exit status 8**
   19 error Failed at the [email protected] start script 'electron main.js'.
   19 error This is most likely a problem with the electron-quick-start package,
   19 error not with npm itself.
   19 error Tell the author that this fails on your system:
   19 error     electron main.js
   19 error You can get information on how to open an issue for this project with:
   19 error     npm bugs electron-quick-start
   19 error Or if that isn't available, you can get their info via:
   19 error
   19 error     npm owner ls electron-quick-start
   19 error There is likely additional logging output above.
   20 verbose exit [ 1, true ]

Use latest instead of specific version

Replace devDependencies['electron-prebuilt'] = 'x.x.x' in package.json with devDependencies['electron-prebuilt'] = 'latest'. This way there will be no need to update package.json after every Electron release.

TypeError: Cannot read property 'on' of undefined

After

> git clone https://github.com/atom/electron-quick-start
> cd electron-quick-start
> npm install
> npm start

I get error:

> [email protected] start /home/do/dev/electron-quick-start
> electron main.js

App threw an error when running [TypeError: Cannot read property 'on' of undefined]
A JavaScript error occurred in the main process
Uncaught Exception:
TypeError: Cannot read property 'on' of undefined
    at Object.<anonymous> (/home/do/dev/electron-quick-start/main.js:34:4)
    at Module._compile (module.js:425:26)
    at Object.Module._extensions..js (module.js:432:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Object.<anonymous> (/home/do/dev/electron-quick-start/node_modules/electron-prebuilt/dist/resources/default_app/main.js:258:23)
    at Module._compile (module.js:425:26)
    at Object.Module._extensions..js (module.js:432:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)

very simple questions, Please help!

I have a very simple page just embed a simplepage in webview.
and my object is to print to PDF for the webview, and try to print all of it, not only the 1 page of it.
Now I want access the webview in mainthread, but blocked..

webview seems only can access in render process, but print must send to main process =,=
I don't how to handle it now.

Any suggestion?

some code related:

//index.html
  <body>
    <h1>Hello World!</h1>
    <!-- All of the Node.js APIs are available in this renderer process. -->
    We are using node <script>document.write(process.versions.node)</script>,
    Chromium <script>document.write(process.versions.chrome)</script>,
    and Electron <script>document.write(process.versions.electron)</script>.
    <button class="demo-button" id="print-pdf">Print PDF</button>
    <webview id="allPage" src="SimplePage.htm" ></webview>
  </body>
//render process
const ipcR = require('electron').ipcRenderer

const printPDFBtn = document.getElementById('print-pdf')

printPDFBtn.addEventListener('click', function (event) {
  ipcR.send('print-to-pdf')
})
//main process
ipc.on('print-to-pdf', function (event) {
  const pdfPath = path.join(os.tmpdir(), 'print.pdf')
  const win = BrowserWindow.fromWebContents(event.sender)
  //use someway to get the webview....
 var webview = getwebview()...//not ready here.  
webview .printToPDF({}, function (error, data) {
    if (error) throw error
    fs.writeFile(pdfPath, data, function (error) {
      if (error) {
        throw error
      }
      shell.openExternal('file://' + pdfPath)
      //event.sender.send('wrote-pdf', pdfPath)
    })
  })
})

Thanks.

Error trying to run quickstart commands

Porting an issue from @keyboSlice! on electron/electron#5198 here:

  • Electron version: 0.37.6
  • Operating system: Ubuntu 14.04

Receiving the following error when trying to get the quick start app up and running

/var/www/electron-quick-start/node_modules/electron-prebuilt/dist/electron: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory

can anyone please advise?

Cannot find module './renderer.js' on windows 7

The require function seems to error on windows 7. (It does work on Mac)

  <script>
    // You can also require other files to run in this process
    require('./renderer.js')
  </script>

But the following would work properly:

  <script src="./renderer.js">
    // You can also require other files to run in this process
    //require('./renderer.js')
  </script>

I just ran npm install && npm start and the error happened.
Is there anything I'm missing to use require in html on windows?

Cannot use 'npm start'

Hi.
This has most likely been solved many times by you already, but I just can't get it to work.

> [email protected] start /root/electron-quick-start
> electron .


npm ERR! Linux 4.4.0-31-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `electron .`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script 'electron .'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron-quick-start package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     electron .
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs electron-quick-start
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls electron-quick-start
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /root/electron-quick-start/npm-debug.log

npm install && npm start error

When i type npm install && npm start this comes as output

sh: 1: node: not found
npm ERR! Linux 4.4.0-22-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn

npm ERR! [email protected] postinstall: `node install.js`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script 'node install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron-prebuilt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs electron-prebuilt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls electron-prebuilt
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/paul/github/electron-quick-start/npm-debug.log

npm-debug_log.txt

Not running on Mac

Here's the output:

> Matthews-MacBook-Pro:~ Matt$ cd /Users/Matt/Downloads/electron-quick-start-master 
> Matthews-MacBook-Pro:electron-quick-start-master Matt$ npm install && npm start
> -
> > [email protected] postinstall /Users/Matt/Downloads/electron-quick-start-master/node_modules/electron-prebuilt
> > node install.js
> 
> [email protected] node_modules/electron-prebuilt
> ├── [email protected] ([email protected], [email protected], [email protected], [email protected])
> └── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
> 
> > [email protected] start /Users/Matt/Downloads/electron-quick-start-master
> > electron main.js
> 
> App threw an error when running [TypeError: Cannot read property 'on' of undefined]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.