You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The path.txt is missing.
Try to run node node_modules/electron/install.js. It should be run automaticlly after you installed electron.
I have the same problem and I run the install.js many times. It seems that function 'downloadArtifact' took so much time that it failed to create path.txt.
The path.txt is missing.
Try to run node node_modules/electron/install.js. It should be run automaticlly after you installed electron.
I have the same problem and I run the install.js many times. It seems that function 'downloadArtifact' took so much time that it failed to create path.txt.
Yes,It causes this problem,but I failed to download electron-v7.0.0-win32-x64.zip through install.js. Eventually, I download electron-v7.0.0-win32-x64.zip from https://npm.taobao.org/mirrors/electron/7.0.0/ ,and unzip it into node_modules\electron\, then create path.txt file with text electron.exe in that directory.Finally,I launched electron@7.0.0. It is the network that causes the problem(electron6 has a different function to download,and it might could download from a mirror).I also find the incomplete cache file in my computer。Is it possible to set a mirror ?
The path.txt is missing.
Try to run node node_modules/electron/install.js. It should be run automaticlly after you installed electron.
I have the same problem and I run the install.js many times. It seems that function 'downloadArtifact' took so much time that it failed to create path.txt. https://github.com/electron/electron/blob/master/npm/install.js#L31
Yes,It causes this problem,but I failed to download electron-v7.0.0-win32-x64.zip through install.js. Eventually, I download electron-v7.0.0-win32-x64.zip from https://npm.taobao.org/mirrors/electron/7.0.0/ ,and unzip it into node_modules\electron\, then create path.txt file with text electron.exe in that directory.Finally,I launched electron@7.0.0. It is the network that causes the problem(electron6 has a different function to download,and it might could download from a mirror).I also find the incomplete cache file in my computer。Is it possible to set a mirror ?
@lutianxiong thank you, that actually worked. To clarify for anyone else following your instructions, add a step "3.5" where you add the downloaded Electron .zip to C:\Users\XXXX\AppData\Roaming\npm\node_modules\electron
Is an actual fix for this in the pipeline? It would be nice for the actual issue to be resolved - instead of just work-arounds. I just tried to install Electron this morning, and I got the same error when trying to run Electron
Actually the install.js didn't run as expected, then I manually add the dist file from https://npm.taobao.org/mirrors/electron/7.1.11/ into the node_modules/electron/dist and change launch method getElectronPath in the node_modules/electron/index.js to return the ./dist/Electron.app/Contents/MacOS/Electron.
I have this problem with the 8.0.0 release, after upgrading electron from 6.1. I am running on a Windows 10 machine and have tried both npm and yarn. The path.txt file is not present in the electron folder, and there is no dist subfolder. So there is a problem with the npm install of electron.
I have two government projects in strict automated environments where packages referenced just need to work. The approach of issuing commands, manually copying files around from older versions etc just isn't a practical solution of any kind for me.
Is the only official supported workaround for this problem to revert to an older 7.x version? Or is there an 8.0.1 update coming that addresses this, and if so, what is the timeline on that?
I download the zip from the taobao mirror, and move the zip to node_modules/electron, then modify the logic that exec the zip instead of download the zip, it's ok, but some minitues later, the error is happend again. And I check the node_modules/electron/install.js, what I modified logic is disappeard. 😢 It's version is 8.0.0.
I download the zip from the taobao mirror, and move the zip to node_modules/electron, then modify the logic that exec the zip instead of download the zip, it's ok, but some minitues later, the error is happend again. And I check the node_modules/electron/install.js, what I modified logic is disappeard. 😢 It's version is 8.0.0.
I solved it. I used yarn, and I find this file in the "C:\Users\local\AppData\Local\Yarn\Data\global\node_modules\electron".
According to @lutianxiong, move to C:\Users\local\AppData\Local\Yarn\Data\global\node_modules\electron
edit install.js, comment downloadArtifact and add extractFile('./electron-v7.1.1-win32-x64.zip');
微信图片_20191114171001
4.node install.js
5.run electron in the terminal
6.If you install electron in your project before you finish the above, you can use 3,4,5 to solve it, of reinstall.
Activity
zhaokjun commentedon Oct 25, 2019
I have the same problem,but electron 6 works well in my computer
GitYonglin commentedon Oct 26, 2019
It happened to me, too.
leon-o commentedon Oct 26, 2019
The path.txt is missing.
Try to run
node node_modules/electron/install.js
. It should be run automaticlly after you installed electron.I have the same problem and I run the install.js many times. It seems that function 'downloadArtifact' took so much time that it failed to create path.txt.
https://github.com/electron/electron/blob/master/npm/install.js#L31
zhaokjun commentedon Oct 26, 2019
Yes,It causes this problem,but I failed to download
electron-v7.0.0-win32-x64.zip
throughinstall.js
. Eventually, I downloadelectron-v7.0.0-win32-x64.zip
from https://npm.taobao.org/mirrors/electron/7.0.0/ ,and unzip it intonode_modules\electron\
, then createpath.txt
file with textelectron.exe
in that directory.Finally,I launched electron@7.0.0. It is the network that causes the problem(electron6 has a different function to download,and it might could download from a mirror).I also find the incomplete cache file in my computer。Is it possible to set a mirror ?szhshp commentedon Nov 2, 2019
Got totally same error.....
UEhQZXI commentedon Nov 14, 2019
i made it!
ifreann commentedon Nov 27, 2019
@lutianxiong thank you, that actually worked. To clarify for anyone else following your instructions, add a step "3.5" where you add the downloaded Electron .zip to C:\Users\XXXX\AppData\Roaming\npm\node_modules\electron
binojvr commentedon Dec 12, 2019
Why its linux version? is it a typo?
SGissubel commentedon Feb 9, 2020
Is an actual fix for this in the pipeline? It would be nice for the actual issue to be resolved - instead of just work-arounds. I just tried to install Electron this morning, and I got the same error when trying to run Electron
Keith-CY commentedon Feb 10, 2020
Actually the
install.js
didn't run as expected, then I manually add the dist file from https://npm.taobao.org/mirrors/electron/7.1.11/ into thenode_modules/electron/dist
and change launch methodgetElectronPath
in thenode_modules/electron/index.js
to return the./dist/Electron.app/Contents/MacOS/Electron
.appurist commentedon Feb 11, 2020
I have this problem with the 8.0.0 release, after upgrading electron from 6.1. I am running on a Windows 10 machine and have tried both npm and yarn. The path.txt file is not present in the electron folder, and there is no
dist
subfolder. So there is a problem with the npm install of electron.I have two government projects in strict automated environments where packages referenced just need to work. The approach of issuing commands, manually copying files around from older versions etc just isn't a practical solution of any kind for me.
Is the only official supported workaround for this problem to revert to an older 7.x version? Or is there an 8.0.1 update coming that addresses this, and if so, what is the timeline on that?
tkgkn commentedon Feb 20, 2020
I download the zip from the taobao mirror, and move the zip to
node_modules/electron
, then modify the logic that exec the zip instead of download the zip, it's ok, but some minitues later, the error is happend again. And I check thenode_modules/electron/install.js
, what I modified logic is disappeard. 😢 It's version is 8.0.0.MGYH commentedon Feb 21, 2020
"https://github.com/electron/electron/releases/v8.0.0/"
edit install.js, comment downloadArtifact and add extractFile('./electron-v7.1.1-win32-x64.zip');
微信图片_20191114171001
4.node install.js
5.run electron in the terminal
6.If you install electron in your project before you finish the above, you can use 3,4,5 to solve it, of reinstall.
My english is poor, hope i can help you
surlykke commentedon Apr 8, 2020
This is probably not relevant for anyone on this thread, but just in case:
I was getting 'Electron failed to install correctly, please...', and tried downgrading/upgrading electron, removing node_modules, removing ~/.cache/electron, running electron-fix, ... nothing worked.
Turned out the issue was that I had
target: "node"
in webpack.config.js. Changing that to
target: "electron-renderer"
fixed it.
Not the most enlightning error message I've come across.
11 remaining items