背景:

electron build报错

⨯ Get "https://npm.taobao.org/mirrors/electron/16.0.10/electron-v16.0.10-win32-x64.zip": EOF
github.com/develar/app-builder/pkg/download.(*Downloader).follow.func1
	/Volumes/data/Documents/app-builder/pkg/download/downloader.go:206
github.com/develar/app-builder/pkg/download.(*Downloader).follow
	/Volumes/data/Documents/app-builder/pkg/download/downloader.go:234
github.com/develar/app-builder/pkg/download.(*Downloader).DownloadNoRetry
	/Volumes/data/Documents/app-builder/pkg/download/downloader.go:128
github.com/develar/app-builder/pkg/download.(*Downloader).Download
	/Volumes/data/Documents/app-builder/pkg/download/downloader.go:112
github.com/develar/app-builder/pkg/electron.(*ElectronDownloader).doDownload
	/Volumes/data/Documents/app-builder/pkg/electron/electronDownloader.go:192
github.com/develar/app-builder/pkg/electron.(*ElectronDownloader).Download
	/Volumes/data/Documents/app-builder/pkg/electron/electronDownloader.go:177
github.com/develar/app-builder/pkg/electron.downloadElectron.func1.1
	/Volumes/data/Documents/app-builder/pkg/electron/electronDownloader.go:73
github.com/develar/app-builder/pkg/util.MapAsyncConcurrency.func2
	/Volumes/data/Documents/app-builder/pkg/util/async.go:68
runtime.goexit
	/usr/local/Cellar/go/1.17/libexec/src/runtime/asm_arm64.s:1133  
  ⨯ /Users/wangxiangyu/Documents/pgli/code/sany/ubvision/node_modules/app-builder-bin/mac/app-builder_arm64 process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Exit code:
1  failedTask=build stackTrace=Error: /Users/wangxiangyu/Documents/pgli/code/sany/ubvision/node_modules/app-builder-bin/mac/app-builder_arm64 process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Exit code:

删除npm代理

npm config delete proxy

⨯ Get "https://cdn.npmmirror.com/binaries/electron/16.0.10/electron-v16.0.10-win32-x64.zip": EOF
github.com/develar/app-builder/pkg/download.(*Part).doRequest
	/Volumes/data/Documents/app-builder/pkg/download/Part.go:108
github.com/develar/app-builder/pkg/download.(*Part).download
	/Volumes/data/Documents/app-builder/pkg/download/Part.go:47
github.com/develar/app-builder/pkg/download.(*Downloader).DownloadResolved.func1.1
	/Volumes/data/Documents/app-builder/pkg/download/downloader.go:155
github.com/develar/app-builder/pkg/util.MapAsyncConcurrency.func2
	/Volumes/data/Documents/app-builder/pkg/util/async.go:68
runtime.goexit
	/usr/local/Cellar/go/1.17/libexec/src/runtime/asm_arm64.s:1133  
  ⨯ /Users/wangxiangyu/Documents/pgli/code/sany/ubvision/node_modules/app-builder-bin/mac/app-builder_arm64 process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Exit code:
1  failedTask=build stackTrace=Error: /Users/wangxiangyu/Documents/pgli/code/sany/ubvision/node_modules/app-builder-bin/mac/app-builder_arm64 process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Exit code:

删除git代理

git config --global --unset http.proxy
git config --global --unset https.proxy

Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐