Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'electron' is not recognized as an internal or external command #13535

Closed
tinomhishi opened this issue Jul 2, 2018 · 9 comments
Closed

'electron' is not recognized as an internal or external command #13535

tinomhishi opened this issue Jul 2, 2018 · 9 comments

Comments

@tinomhishi
Copy link

tinomhishi commented Jul 2, 2018

  • Electron Version:electron@2.0.3
  • Operating System (Platform and Version):Windows 8
  • Last known working Electron version: N/A

Expected Behavior
Expected electron to open on command 'electron .'

Actual behavior
error 'electron' is not recognized as an internal or external command
A clear and concise description of what actually happened.

To Reproduce
Your best chance of getting this bug looked at quickly is to provide a REPOSITORY that can be cloned and run.

You can fork electron-quick-start and include a link to the branch with your changes.

If you provide a URL, please list the commands required to clone/setup/run your repo e.g.

$ git clone $YOUR_URL -b $BRANCH
$ npm install
$ npm start || electron .

Screenshots
If applicable, add screenshots to help explain your problem.

Additional Information
Add any other context about the problem here.

@welcome
Copy link

welcome bot commented Jul 2, 2018

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@MarshallOfSound
Copy link
Member

@tinomhishi This sounds like you have not installed Electron globally. You haven't filled out the steps to reproduce either here so we can't really help.

In order to run the electron command you need to have node and npm installed and configured correctly then run.

npm i -g electron

@dstoikov96
Copy link

Hello, I'm following these steps but after "npm install" i got an error message like this:

Error: read ECONNRESET
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:111:27)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron@4.0.8 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron@4.0.8 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\user\AppData\Roaming\npm-cache\_logs\2019-03-12T07_54_51_307Z-debug.log

@chance221
Copy link

chance221 commented Jul 11, 2019

I am going through a tutorial and trying to use electron with nodemon to watch for changes to the main file but when I run the watch command it comes up as 'electron .' not recognized as a command. I have electron 5.0.0 and nodemon 1.18.9 as devDependencies. Electron is installed globally and nodemon is set as a watch in the package.json. I can run the 'electron .' command from the terminal but it still is not recognizable as a command when nodemon tries to execute on it. Here is a linke to the repo I downloaded for the tutorial https://github.com/stackacademytv/master-electron

@MahmudulHassan5809
Copy link

I am going through a tutorial and trying to use electron with nodemon to watch for changes to the main file but when I run the watch command it comes up as 'electron .' not recognized as a command. I have electron 5.0.0 and nodemon 1.18.9 as devDependencies. Electron is installed globally and nodemon is set as a watch in the package.json. I can run the 'electron .' command from the terminal but it still is not recognizable as a command when nodemon tries to execute on it. Here is a linke to the repo I downloaded for the tutorial https://github.com/stackacademytv/master-electron

hey remove the single just put this line "watch": "nodemon --exec electron ."

@sabuncu
Copy link

sabuncu commented Jan 2, 2020

hey remove the single quote and just put this line "watch": "nodemon --exec electron ."

@MahmudulHassan5809 Thank you, your fix worked. Much appreciated.

@Atsukoro1
Copy link

legit

@dsuyu1
Copy link

dsuyu1 commented Oct 26, 2023

  • Electron Version:electron@2.0.3
  • Operating System (Platform and Version):Windows 8
  • Last known working Electron version: N/A

Expected Behavior Expected electron to open on command 'electron .'

Actual behavior error 'electron' is not recognized as an internal or external command A clear and concise description of what actually happened.

To Reproduce Your best chance of getting this bug looked at quickly is to provide a REPOSITORY that can be cloned and run.

You can fork electron-quick-start and include a link to the branch with your changes.

If you provide a URL, please list the commands required to clone/setup/run your repo e.g.

$ git clone $YOUR_URL -b $BRANCH
$ npm install
$ npm start || electron .

Screenshots If applicable, add screenshots to help explain your problem. Additional Information Add any other context about the problem here.

works fr, thank you so much !

@Bargamut
Copy link

For those who will find this for case Windows + WSL/

In my case I installed Electron on the Windoes side - at this moment I don't understand why It can't work with installation on Linux side, but after this trick I can start my app on both sides.

Hope it'll be useful for somebody. )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants