+ 1
require('SOLVED'); [Electron Quick Start Issue] TypeError: Cannot read property 'on' of undefined
I was following Writing Your First Electron App https://electronjs.org/docs/tutorial/first-app I got the error as titled. I searched and a solution is found at https://github.com/electron/electron-quick_start/issues/107 Replace script with "scripts" :{"test" :"electron . ", "start" :"electron . "} I edited package.JSON accordingly, but the error is still there 👉👈
32 Antworten
+ 3
Try to run
npm install --save-dev electron
again
Make sure cmd run as administrator
+ 3
You can set path environment variables.
Node sets itself during setup. You can exec command "node" in any location (globally)
+ 3
After unzipping cmder mini
Popup:
Warning!
ConEmu binaries were marked as 'Downloaded from internet' :
This may cause blocking or access denied errors!
🤔
Firewall?
+ 3
Gordon
Did you solve your problem?
+ 2
2 steps
npm i is same as npm install sharthand
+ 2
Better way to use windows command prompt, download cmder.net tool
https://cmder.net
I dont use windows command prompt, too lousy.
I use cmder, very best tool.
OR
you could use VS Code terminal, no need to leave your editor, very convenient.
+ 2
Oh I fixed three typos and now it is working ~
+ 2
Gordon
So you had 3 typos. And they were purposes of errors?
+ 2
Calvin solved my problem
I followed his install command with --save-dev and his command prompt application
+ 1
So the steps are:
nvm use 10.11.0
npm i -D electron@latest
npm install --save-dev electron
Three steps?
+ 1
I am using the cmd of Node, am I right?
And when I choose run as administrator, I find that the starting directory is System32 instead of Users, so I just start to input the commands at System32? Or I should switch back to the folder created for Node projects?
+ 1
I always run cmd from working project folder..
+ 1
After in Node.js command prompt
nvm use 10.11.0
It said
'nvm' 不是內部或外部命令、可執行的程式或批次檔。
🤔
+ 1
You mean no need to change Node version?
+ 1
Should run from normal command prompt at working folder.
+ 1
Go to windows find
Type "cmd"
Select "Command Prompt"
cd <change to working folder>
continue with your commands
+ 1
I see what you mean by Nodejs comand now
DONT USE nodejs command line for any npm and other installations...
Node command line just a repl for node script testing only.
When we say command prompt cmd, it should be windows command prompt.
+ 1
VS Code Terminal is referring to
"Package Manager Console" at bottom of middle of VS interface?
+ 1
cmder
download mini or download full?
+ 1
After unzipping cmder mini
Popup:
Warning!
ConEmu binaries were marked as 'Downloaded from internet' :
This may cause blocking or access denied errors!
🤔