microsoft / BotFramework-Emulator

A desktop application that allows users to locally test and debug chat bots built with the Bot Framework SDK.
https://aka.ms/botemulator
MIT License
1.81k stars 753 forks source link

node_modules\electron\dist\electron.exe ENOENT error #135

Closed Girimurugan closed 7 years ago

Girimurugan commented 7 years ago

Hi Team,

After installing all the node modules, after built process using gulp when we run npm run start we get the below error.

But the electron.cmd file exits in \node_modules.bin folder. Please let us know how we could fix this issue.

events.js:160 throw er; // Unhandled 'error' event ^

Error: spawn C:\Users******\AzureBots\BotFramework-Emulator\node_modules\electron\dist\electron.exe ENOENT at exports._errnoException (util.js:1022:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32) at onErrorNT (internal/child_process.js:359:16) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9) at Module.runMain (module.js:606:11) at run (bootstrap_node.js:394:7) at startup (bootstrap_node.js:149:9) at bootstrap_node.js:509:3

Best Regards, Giri

eanders-ms commented 7 years ago

Where any errors reported during npm install?

Girimurugan commented 7 years ago

No there were no errors during npm install.

eanders-ms commented 7 years ago

Does this file exist? C:\Users******\AzureBots\BotFramework-Emulator\node_modules\electron\dist\electron.exe

Girimurugan commented 7 years ago

No this file does not exists in this location. But the file is present in C:\Users**\AzureBots\BotFramework-Emulator\node_modules.bin folder.

eanders-ms commented 7 years ago

Hm, it might be working for me because I have electron installed at the global scope. Try running this command: .\node_modules\.bin\electron.cmd .

eanders-ms commented 7 years ago

Or even: .\node_modules\.bin\electron . (should work on all platforms)

eanders-ms commented 7 years ago

Any luck?

eanders-ms commented 7 years ago

Closing due to no response. @Girimurugan If you're still having problems please open a new issue. Cheers.

Ohar commented 5 years ago

I went into the same problem and solve it by removing whole node_modules folder and run npm install from scratch.

Nantris commented 3 years ago

If anyone else comes across this issue, if you're missing the dist/electron.exe folder, delete

and if you're using yarn then run yarn --check-files

A bit faster than rebuilding the whole folder.

rickymarley commented 2 years ago

Just go to your electron project and run : npm install electron

Nantris commented 2 years ago

@rickymarley that doesn't work for most people hitting issues like this.

The actual solution is to go to the node_modules/electron folder and then run npm postinstall - which will move the missing Electron executable file into node_modules/electron/dist.

harish-kommuri commented 5 months ago

I have faced similar issue on Mac. I have run npm cache clean --force and removed node_modules folder from current project. Then reinstalled node modules using npm i

This solved my issue.