Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use make-fetch-happen instead of node-fetch when downloading compiler #117

Closed
pmwmedia opened this issue Mar 18, 2022 · 3 comments · Fixed by #135
Closed

Use make-fetch-happen instead of node-fetch when downloading compiler #117

pmwmedia opened this issue Mar 18, 2022 · 3 comments · Fixed by #135
Assignees
Labels
enhancement New feature or request

Comments

@pmwmedia
Copy link

The package cannot be used on Windows computers behind a corporate proxy as it is common in many companies. npm itself can download all packages, but download-compiler-for-end-user.js does not respect the proxy configuration.

Running 'npm install --https-proxy=http://<my-proxy>:8080 --proxy=http://<my-proxy>:8080 --noproxy=localhost' in <my-path>
npm ERR! code 1
npm ERR! path <my-path>\node_modules\sass-embedded
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node ./download-compiler-for-end-user.js
npm ERR! Downloading dart-sass-embedded release asset.
npm ERR! FetchError: request to https://github.com/sass/dart-sass-embedded/releases/download/1.49.9/sass_embedded-1.49.9-windows-x64.zip failed, reason: connect ECONNREFUSED <ip>:<port>
npm ERR!     at ClientRequest.<anonymous> (<my-path>\node_modules\node-fetch\lib\index.js:1491:11)
npm ERR!     at ClientRequest.emit (node:events:526:28)
npm ERR!     at TLSSocket.socketErrorListener (node:_http_client:442:9)
npm ERR!     at TLSSocket.emit (node:events:526:28)
npm ERR!     at emitErrorNT (node:internal/streams/destroy:157:8)
npm ERR!     at emitErrorCloseNT (node:internal/streams/destroy:122:3)
npm ERR!     at processTicksAndRejections (node:internal/process/task_queues:83:21) {
npm ERR!   type: 'system',
npm ERR!   errno: 'ECONNREFUSED',
npm ERR!   code: 'ECONNREFUSED'
npm ERR! }
@jathak jathak added the enhancement New feature or request label Mar 23, 2022
@jathak jathak changed the title Fails to download sass_embedded-*.zip behind proxy Use make-fetch-happen instead of node-fetch when downloading compiler Mar 23, 2022
@jathak
Copy link
Member

jathak commented Mar 23, 2022

It looks like the issue here is that we use node-fetch to download the compiler instead of make-fetch-happen (which should respect proxy settings automatically).

@chrisuehlinger-techslice
Copy link
Contributor

Hey there! I'm running into this issue on a project at my job that really needs to get off the old sass+fibers approach.

If I were to submit a PR with this enhancement, would you be willing to review and (if it works) accept it? Or are contributions limited to Sass team members only?

@nex3
Copy link
Contributor

nex3 commented Apr 18, 2022

We're always happy to review external contributions!

@nex3 nex3 self-assigned this Jun 13, 2022
@nex3 nex3 closed this as completed in #135 Jun 13, 2022
nex3 added a commit to sass/dart-sass that referenced this issue Jun 13, 2022
nex3 added a commit to sass/dart-sass that referenced this issue Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants