Jupyter Labs:"RuntimeError:npm依赖项安装失败"建造时 [英] Jupyter Labs: "RuntimeError: npm dependencies failed to install" When Building
问题描述
我是刚开始使用Anaconda的人,最近刚在计算机上安装了jupyter实验室.但是,每当我尝试在本地Jupyter Labs实例上构建时,都会出现以下错误:
I'm new to using Anaconda and recently installed jupyter labs on my computer. However, any time I try to build on my local Jupyter Labs instance I get the following error:
在jupyter Labs终端中运行的代码:
Code run in jupyter labs terminal:
PS C:\Users\briakeit> jupyter lab build
输出:
[LabBuildApp] JupyterLab 1.2.5
[LabBuildApp] Building in C:\Users\briakeit\AnacondaFiles\share\jupyter\lab
[LabBuildApp] Building jupyterlab assets (build:prod:minimize)
An error occured.
RuntimeError: npm dependencies failed to install
See the log file for details: C:\Users\briakeit\AppData\Local\Temp\jupyterlab-debug-0b5ejkfm.log
日志文件:
[LabBuildApp] Building in C:\Users\briakeit\AnacondaFiles\share\jupyter\lab
[LabBuildApp] Yarn configuration loaded.
[LabBuildApp] Node v13.7.0
[LabBuildApp] Building jupyterlab assets (build:prod:minimize)
[LabBuildApp] > node C:\Users\briakeit\AnacondaFiles\lib\site-packages\jupyterlab\staging\yarn.js install --non-interactive
[LabBuildApp] yarn install v1.15.2
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] 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...
error An unexpected error occurred: "https://registry.yarnpkg.com/@jupyterlab/application-extension/-/application-extension-1.2.1.tgz: read ECONNRESET".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Users\\briakeit\\AnacondaFiles\\share\\jupyter\\lab\\staging\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[LabBuildApp] npm dependencies failed to install
[LabBuildApp] Traceback (most recent call last):
[LabBuildApp] File "C:\Users\briakeit\AnacondaFiles\lib\site-packages\jupyterlab\debuglog.py", line 47, in debug_logging
yield
[LabBuildApp] File "C:\Users\briakeit\AnacondaFiles\lib\site-packages\jupyterlab\labapp.py", line 98, in start
command=command, app_options=app_options)
[LabBuildApp] File "C:\Users\briakeit\AnacondaFiles\lib\site-packages\jupyterlab\commands.py", line 459, in build
command=command, clean_staging=clean_staging)
[LabBuildApp] File "C:\Users\briakeit\AnacondaFiles\lib\site-packages\jupyterlab\commands.py", line 660, in build
raise RuntimeError(msg)
[LabBuildApp] RuntimeError: npm dependencies failed to install
[LabBuildApp] Exiting application: JupyterLab
每当我尝试使用此命令时(例如在安装新的扩展程序之后),都会发生这种情况.根据conda,我在此环境中安装了npm v6.4.1,nodejs v10.13.0和yarn v1.22.0.我正在运行Jupyter实验室1.2.6.
This happens anytime I try using this command (e.g. after installing anew extension). I have npm v6.4.1, nodejs v10.13.0, and yarn v1.22.0 installed in this environment according to conda. I'm running Jupyter lab 1.2.6.
任何反馈,建议或帮助,将不胜感激.
Any feedback, suggestions or help would be greatly appreciated.
推荐答案
我相信我已经找到了问题.我为一家公司咨询,并且我使用的是他们提供给我的计算机(我是计算机的管理员).当我在个人计算机上执行相同的步骤时,它没有任何问题.
I believe I have found the problem. I consult for a company and I was using the computer they provided me (I'm an admin on the computer). When I followed the same steps on my personal computer, it worked with no issues.
然后,我在工作时切换到另一个更开放的网络,并且构建能够顺利完成.显然,防火墙中有某些内容或阻止我进行构建的内容.
I then switched over to a different, more open network at work and the build was able to complete without errors. Clearly there is something in the firewall or something that was preventing me from doing the build.
这篇关于Jupyter Labs:"RuntimeError:npm依赖项安装失败"建造时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!