mac 開發electron遇到的坑

一、mac環境下electron下載失敗,.npmrc 文件添加如下內容node

electron_mirror=https://npm.taobao.org/mirrors/electron/
electron_custom_dir=5.0.13

安裝哪一個版本就把electron_custom_dir的值改爲對應的版本號npm

另外,electron對應的版本node版本要根據electron官網上介紹的對應,否則可能會在打包的時候報錯sass

二、使用nvm切換node版本,容易出現process is not defined的錯誤,執行electron

npm rebuild node-sassui

相關文章
相關標籤/搜索