Jupyter Lab build fails after installing extension: path names too long for Windows
See original GitHub issueI’m not sure where this issue belongs. I tried running these commands (from here https://github.com/matplotlib/jupyter-matplotlib/issues/9#issuecomment-340257700):
pip install jupyterlab==0.28.11 ipympl==0.0.8
jupyter labextension install @jupyter-widgets/jupyterlab-manager@^0.28 jupyter-matplotlib@^0.1
jupyter lab
The step jupyter labextension install @jupyter-widgets/jupyterlab-manager@^0.28 jupyter-matplotlib@^0.1 would fail on the check step. When I listed the installed extensions, they appeared to be installed, but when I would start up jupyter lab, it would recommend that I rebuild. When I would try to build, it would fail, saying that the “The system cannot find the path specified.”
The path in question was
C:\Users\Jeremy\Anaconda3\share\jupyter\lab\staging\node_modules\jupyter-matplotlib\node_modules\@jupyter-widgets\base\node_modules\@jupyterlab\services\node_modules\@jupyterlab\coreutils\node_modules\ajv\node_modules\json-schema-traverse\spec\fixtures\schema.js
I figured out that the problem was that problem was that the path name was too long. See here: https://msdn.microsoft.com/en-us/library/aa365247.aspx#maxpat . I fixed the problem by changing the option in my system registry to allow longer path names. After doing this and performing a clean install, everything worked as expected. I figured I should report this potential problem.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)

Top Related StackOverflow Question
Ah, I recently added a check (not in that version of JLab) that verifies node 5+ before trying to install an extension, because it installs maximally flat, which allows use to dedupe packages and avoids the long path problem on Windows.
Let’s call this one closed, thanks!
Hmm. I can’t replicate it myself. I reset
LongPathsEnabledand rebooted, uninstalled nodejs and jupyterlab et al, and then started from scratch. However, everything seems to be working fine this time. A possible reason is that when I was first trying to get it to work, I realized I had two copies of nodejs installed—one that I installed a year and a half ago (4.4.7 with npm v. 2.15.8) and the other freshly fromconda. I removed the old version while I was tinkering and proceeded to try things to get it to work. Maybe that had something to do with it? While I was trying to replicate the error, I tried with this older version ofnpmand everything still seemed to work fine. So, I don’t really know what happened. I don’t see the directory@jupyter-widgetsbeing created (or at least persisting) after the build this time.So, anyway, sorry to bother with this one. I guess it’s probably not worth looking into further. Thanks for checking it though!