镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

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

Closed

Description

@pmwmedia

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! }

Activity

  1. changed the title [-]Fails to download sass_embedded-*.zip behind proxy[/-] [+]Use make-fetch-happen instead of node-fetch when downloading compiler[/+] on Mar 23, 2022
  2. jathak commented on Mar 23, 2022

    @jathak
    Member

    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).

  3. chrisuehlinger-techslice commented on Apr 12, 2022

    @chrisuehlinger-techslice
    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?

  4. nex3 commented on Apr 18, 2022

    @nex3
    Contributor

    We're always happy to review external contributions!

  5. self-assigned this
    on Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions