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
When trying to build a Electron.NET app on my company laptop behind a corporate proxy, it fails with an npm error although the environment variables HTTP_PROXY and HTTPS_PROXY are set.
Build Electron Application...
Arguments:
target = win
Build ASP.NET Core App for win-x64...
Executing dotnet publish in this directory: C:\work\GitHub\ElectronWebsiteWrapper\obj\desktop\win
Build ASP.NET Core App for win-x64 under Release-Configuration...
dotnet publish -r win-x64 -c "Release" --output "C:\work\GitHub\ElectronWebsiteWrapper\obj\desktop\win\bin" /p:PublishReadyToRun=true /p:PublishSingleFile=true --self-contained
dotnet publish -r win-x64 -c "Release" --output "C:\work\GitHub\ElectronWebsiteWrapper\obj\desktop\win\bin" /p:PublishReadyToRun=true /p:PublishSingleFile=true --self-contained
Determining projects to restore...
All projects are up-to-date for restore.
C:\Program Files\dotnet\sdk\8.0.300\Current\SolutionFile\ImportAfter\Microsoft.NET.Sdk.Solution.targets(36,5): warning NETSDK1194: The "--output" option isn't supported when building a solution. Specifying a solution-level output path results in all projects copying outputs to the same directory, which can lead to inconsistent builds. [C:\work\GitHub\ElectronWebsiteWrapper\ElectronWebsiteWrapper.sln]
ElectronWebsiteWrapper -> C:\work\GitHub\ElectronWebsiteWrapper\bin\Release\net8.0\win-x64\ElectronWebsiteWrapper.dll
ElectronWebsiteWrapper -> C:\work\GitHub\ElectronWebsiteWrapper\obj\desktop\win\bin\
Start npm install...
npm install --production
npm WARN config production Use `--omit=dev` instead.
added 48 packages, and audited 49 packages in 3s
found 0 vulnerabilities
ElectronHostHook handling started...
Build Electron Desktop Application...
Executing electron magic in this directory: C:\work\GitHub\ElectronWebsiteWrapper\bin\desktop
Create electron-builder configuration file...
node build-helper.js electron.manifest.json
Package Electron App for Platform win...
npx electron-builder --config=./bin/electron-builder.json --win --x64 -c.electronVersion=23.2.0
npm ERR! code ENOENT
npm ERR! syscall lstat
npm ERR! path C:\Users\myUser\AppData\Roaming\npm
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, lstat 'C:\Users\myUser\AppData\Roaming\npm'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in: C:\Users\myUser\AppData\Local\npm-cache\_logs\2024-06-17T14_35_15_490Z-debug-0.log
... done
Further information
At the very beginning, only the environment variables HTTP_PROXY and HTTPS_PROXY were set on my laptop. This way, npm didn't restore any packages. I had to explicitly run npm config set proxy http://proxy.company.com:1234 to get to the current point.
Problem description
When trying to build a Electron.NET app on my company laptop behind a corporate proxy, it fails with an
npm
error although the environment variablesHTTP_PROXY
andHTTPS_PROXY
are set.Versions
23.6.2
8.0.300
20.8.1
electronize build /target win
)Steps to Reproduce
dotnet tool restore
dotnet electronize build /target win
Logs
Further information
At the very beginning, only the environment variables
HTTP_PROXY
andHTTPS_PROXY
were set on my laptop. This way,npm
didn't restore any packages. I had to explicitly runnpm config set proxy http://proxy.company.com:1234
to get to the current point.The problem is not bound to this particular app - it also fails for https://github.com/mu88/BlazorFotoManager.
The text was updated successfully, but these errors were encountered: