Example package.json has download issues

I’ve successfully created and exercised the Hello World Theia “app” generated by Yeoman. But I’m going through the process of creating a Theia project form scratch so I can better learn what’s going on under the covers.

Specifically, I’m following the recipe in Theia - Cloud and Desktop IDE Platform

Under the “Consuming VS Code Extensions” section, there’s an example package.json that shows how to consume/package VS Code extensions. Running yarn on that, however, results in quite a few

   Server returned code 429.

errors and ultimately

Error: Errors downloading some plugins. To make these errors non fatal, re-run with --ignore-errors
    at downloadPlugins (/j.cortell/git/theia-scratch/node_modules/@theia/cli/lib/download-plugins.js:112:15)
    at async Object.handler (/j.cortell/git/theia-scratch/node_modules/@theia/cli/lib/theia.js:308:13)
error Command failed with exit code 1.

I’m able to get past this by specifying --ignore-errors but figured I’d report this.

@jcortell the error message comes from open-vsx when hitting their rate limit. To avoid the problem for now you can use --parallel=false when performing yarn download:plugins.

Thanks. Looks like that might be a new option in newer yarn (I had 1.x). So I upgraded my yarn and now I’m running into TLS/read ECONNRESET issues with the new (3.3.0) yarn. :-/ Down the rabbit hole I go. Thanks, though.

Thanks. Looks like that might be a new option in newer yarn

The --parallel=false option is for our download:plugins script which your application is likely calling in order to download plugins.

theia download:plugins

Download defined external plugins

  --help                    Show help                                  [boolean]
  --version                 Show version number                        [boolean]
  --app-target              The target application type. Overrides
                            `theia.target` in the application's package.json
                                                [choices: "browser", "electron"]
  --packed, -p              Controls whether to pack or unpack plugins
                                                      [boolean] [default: false]
  --ignore-errors, -i       Ignore errors while downloading plugins
                                                      [boolean] [default: false]
  --api-version, -v         Supported API version for plugins[default: "1.55.2"]
  --api-url, -u             Open-VSX Registry API URL
                                           [default: "https://open-vsx.org/api"]
  --parallel                Download in parallel       [boolean] [default: true]
  --proxy-url               Proxy URL
  --proxy-authentification  Proxy authentification information
  --strict-ssl              Whether to enable strict SSL mode
                                                      [boolean] [default: false]
Done in 0.42s.

So I upgraded my yarn

Please be sure to use a yarn version which is supported by the framework and documented in the prerequisites. At the time of writing this should be >= 1.7.0 and < 2.x.x.

Ahhh. Well, that’s a relief. Let me roll back to v1 and try again

I’m back in a working state (with yarn) but the problem no longer reproduces. I’ve wiped everything out and just yarn installs everything without errors. Not surprising I guess since you said it’s a rate limiting thing, which can vary from one try to another. But at least I now know how to get around it next time it happens. Thanks!

1 Like