author-pic

Tomohiro Nagasaka

セットアップ


Published on May 10, 2020

中国ではElectronのダウンロードが異様に遅い。。。

set ELECTRON_MIRROR=https://npm.taobao.org/mirrors/electron/
npm install .

なんかエラーが出てもう一回インストールしろと言われる。 スクリプトを走らせるだけで直った。

D:\DEV\monaco-editor-samples\electron-amd>electron .
C:\Users\a\AppData\Roaming\npm\node_modules\electron\index.js:14
    throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again')
    ^

Error: Electron failed to install correctly, please delete node_modules/electron and try installing again
    at getElectronPath (C:\Users\a\AppData\Roaming\npm\node_modules\electron\index.js:14:11)
    at Object.<anonymous> (C:\Users\a\AppData\Roaming\npm\node_modules\electron\index.js:18:18)
    at Module._compile (internal/modules/cjs/loader.js:1133:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
    at Module.load (internal/modules/cjs/loader.js:977:32)
    at Function.Module._load (internal/modules/cjs/loader.js:877:14)
    at Module.require (internal/modules/cjs/loader.js:1019:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (C:\Users\a\AppData\Roaming\npm\node_modules\electron\cli.js:3:16)
    at Module._compile (internal/modules/cjs/loader.js:1133:30)

D:\DEV\monaco-editor-samples\electron-amd>node C:\Users\a\AppData\Roaming\npm\node_modules\electron\install.js       

D:\DEV\monaco-editor-samples\electron-amd>electron .

npm run simpleserver

''' npm install --global --production windows-build-tools node js gyp err cant find python executable windows Install node-gyp globally as admin using the following command: npm install node-gyp '''

If you like it, share it!