question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Install error - yarn network connection

See original GitHub issue

I am behind a corporate proxy. However, I have all of my proxy and ssl settings set up in ~/.npmrc and ~/.yarnrc, and use npm to install things all the time.

I’ve installed various other labextensions with no problem, but jupyterlab-git extension fails when I install it using jupyter labextension install @jupyterlab/git or if I clone and install directly. It always fails at:

Building jupyterlab assets (build:prod:minimize)
> node /u/dramsoft/miniconda3/envs/jupyterhub/lib/python3.7/site-packages/jupyterlab/staging/yarn.js install --non-interactive
yarn install v1.19.0
[1/5] Validating package.json...
[2/5] Resolving packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error Couldn't find package "nbdime@~5.0.1" required by "@jupyterlab/git@file:../extensions/jupyterlab-git-0.8.2.tgz" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.


npm dependencies failed to install
Traceback (most recent call last):

  File "/u/dramsoft/miniconda3/envs/jupyterhub/lib/python3.7/site-packages/jupyterlab/debuglog.py", line 47, in debug_logging
    yield

  File "/u/dramsoft/miniconda3/envs/jupyterhub/lib/python3.7/site-packages/jupyterlab/labextensions.py", line 105, in start
    core_config=self.core_config)

  File "/u/dramsoft/miniconda3/envs/jupyterhub/lib/python3.7/site-packages/jupyterlab/commands.py", line 378, in build
    command=command, clean_staging=clean_staging)

  File "/u/dramsoft/miniconda3/envs/jupyterhub/lib/python3.7/site-packages/jupyterlab/commands.py", line 574, in build
    raise RuntimeError(msg)

RuntimeError: npm dependencies failed to install

Exiting application: jupyter

Whenever I search for yarn installation problems, the solution always seems to increase the network-timeout. I’ve done that in ~/.yarnrc, but I don’t think it’s taking effect. I updated site-packages/jupyterlab/staging/.yarnrc, and confirmed this .yarnrc was being copied into the jupyter/lab/staging area, but again, same error.

I can run standalone npm and download the nbdime package that is failing in yarn.

So what other settings can I change, or can I force to install with npm instead of yarn?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
joelioncommented, Oct 22, 2019

@fcollonval - i am using the jlpm bundled in JupyterLab, and it is 1.15.2. The 1.19.0 you were seeing was my yarn version. Or, should jlpm and yarn be the same version…? Below is the yarn error when I run jlpm install

$ which yarn
/u/dramsoft/miniconda3/envs/jupyterhub/bin/yarn

$ yarn --version
1.19.0

$ which jlpm
/u/dramsoft/miniconda3/envs/jupyterhub/bin/jlpm

$ jlpm --version
1.15.2

$ jlpm install
yarn install v1.15.2
[1/4] Resolving packages...
[2/4] Fetching packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/@jupyterlab/coreutils/-/coreutils-3.1.0.tgz: ESOCKETTIMEDOUT".
info If you think this is a bug, please open a bug report with the information provided in "/home/dramsoft/jupyterhub/extensions/jupyterlab-git/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...

Thanks @marskar. I, too, downloaded jupyterlab-git and tried to install it from source, but I run into the same error when it tries to install dependencies.

0reactions
timenet2300commented, May 8, 2022

check this: conda install -c conda-forge nodejs. it might work

Read more comments on GitHub >

github_iconTop Results From Across the Web

Yarn - There appears to be trouble with your network ...
Often, your error is caused by hitting the network connection time limit, and yarn simply reports there is "trouble with your network connection...
Read more >
How to Fix Yarn Trouble With Network Connection - PostSrc
The first thing to do if you have this error is to update the yarn command to the latest version as well as...
Read more >
There appears to be trouble with your network connection ...
this kind of error occurs when your net cannot access some package resource which yarn.lock file specified. check your yarn.lock file or delete ......
Read more >
yarn install often fails due to network timeout
Part of some of our builds exist of yarn install . Way to often, this step fails due to network timeout. See log...
Read more >
Yarn let us down today : "There appears to be trouble with ...
Since we are a Google Partner we have access to tons of VMs but yarn was failing there too. All our CI/CD pipelines...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found