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

packaging with yarn fails behind http proxy #3784

Closed
r10r opened this issue May 12, 2022 · 3 comments · Fixed by #3933
Closed

packaging with yarn fails behind http proxy #3784

r10r opened this issue May 12, 2022 · 3 comments · Fixed by #3933
Assignees
Labels
good first issue help wanted type/debt Technical debt that could slow us down in the long run
Milestone

Comments

@r10r
Copy link

r10r commented May 12, 2022

Hi there,

I run into the following error when trying to package / build xterm.js with yarn
behind a http proxy.

The script addons/xterm-addon-ligatures/bin/download-fonts.js fails to download the fonts.
This seems to be an axios related issue. Related to axios/axios#3903 ?

The related error on the console is:

devcontainer:~/xterm.js# yarn                                                                                                                                                                          
yarn install v1.22.17                                                                                                                                                                                  
warning ../package.json: No license field                                                                                                                                                              
[1/4] Resolving packages...                                                                                                                                                                            
[2/4] Fetching packages...                                                                                                                                                                             
[3/4] Linking dependencies...                                                                                                                                                                          
[4/4] Building fresh packages...                                                                                                                                                                       
warning Your current version of Yarn is out of date. The latest version is "1.22.18", while you're on "1.22.17".                                                                                       
info To upgrade, run the following command:                                                                                                                                                            
$ apk update && apk add -u yarn                                                                                                                                                                        
$ npm run setup                                                                                                                                                                                        
                                                                                                                                                                                                       
> xterm@4.18.0 presetup                                                                                                                                                                                
> node ./bin/install-addons.js                                                                                                                                                                         
                                                                                                                                                                                                       
pulling addon dependencies...                                                                                                                                                                          
Skipped out                                                                                                                                                                                            
Skipped xterm-addon-attach                                                                                                                                                                             
Skipped xterm-addon-fit                                                                                                                                                                                
Preparing xterm-addon-ligatures                                                                                                                                                                        
warning ../../../package.json: No license field                                                                                                                                                        
Error: Request failed with status code 502                                                                                                                                                             
    at createError (/root/xterm.js/addons/xterm-addon-ligatures/node_modules/axios/lib/core/createError.js:16:15)                                                                                      
    at settle (/root/xterm.js/addons/xterm-addon-ligatures/node_modules/axios/lib/core/settle.js:17:12)                                                                                                
    at IncomingMessage.handleStreamEnd (/root/xterm.js/addons/xterm-addon-ligatures/node_modules/axios/lib/adapters/http.js:269:11)                                                                    
    at IncomingMessage.emit (node:events:538:35)                                                                                                                                                       
    at endReadableNT (node:internal/streams/readable:1345:12)                                                                                                                                          
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {                                                                                                                           
  config: {                                                                                                                                                                                            
    url: 'https://github.com/tonsky/FiraCode/raw/d42e7276fa925e5f82748f3ec9ea429736611b48/distr/otf/FiraCode-Regular.otf',                                                                             
    method: 'get',                                                                                                                                                                                     
    headers: {                                                                                                                                                                                         
      Accept: 'application/json, text/plain, */*',                                                                                                                                                     
      'User-Agent': 'axios/0.21.2',                                                                                                                                                                    
      host: 'github.com'                                                                                                                                                                               
    },                   

Workaround

I ended up downloading the fonts manually using

wget https://github.com/tonsky/FiraCode/raw/d42e7276fa925e5f82748f3ec9ea429736611b48/distr/otf/FiraCode-Regular.otf
mv FiraCode-Regular.otf addons/xterm-addon-ligatures/fonts/firaCode.otf
wget https://github.com/be5invis/Iosevka/releases/download/v1.14.3/01-iosevka-1.14.3.zip
unzip 01-iosevka-1.14.3.zip
mv ttf/iosevka-regular.ttf  addons/xterm-addon-ligatures/fonts
@Tyriar Tyriar added help wanted type/debt Technical debt that could slow us down in the long run labels May 12, 2022
@Tyriar
Copy link
Member

Tyriar commented May 12, 2022

I guess we could just show a warning instead of erroring out so the install succeeds.

@r10r
Copy link
Author

r10r commented May 13, 2022

That would be good. What happens when the fonts are not available then ?

@Tyriar
Copy link
Member

Tyriar commented May 13, 2022

@r10r only impact should be the ligatures addon tests will fail

Tyriar added a commit to Tyriar/xterm.js that referenced this issue Jul 24, 2022
@Tyriar Tyriar added this to the 4.20.0 milestone Jul 24, 2022
@Tyriar Tyriar self-assigned this Jul 24, 2022
@Tyriar Tyriar modified the milestones: 4.20.0, 5.0.0 Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue help wanted type/debt Technical debt that could slow us down in the long run
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants