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

labextension install fails when read-only template yarn.lock is copied into staging directory #7525

Closed
MMesch opened this issue Nov 14, 2019 · 3 comments
Labels
bug status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Milestone

Comments

@MMesch
Copy link

MMesch commented Nov 14, 2019

Description

jupyter labextension install myextension --app-dir=./myapp

fails with

error An unexpected error occurred: "EACCES: permission denied, open '/nix/store/lg2kmn1i3wj0473q0i6vbjbqhvrg5yky-jupyterlab-extended/staging/yarn.lock'"

when the template yarn.lock file that is included in the base jupyterlab package is readonly. In this case, it seems to be copied over to ./myapp when the staging directory is populated without setting the appropriate access rights:

shutil.copy(lock_template, lock_path)

This naturally occurs when installing jupyterlab with Nix, where the base install has to be immutable to ensure reproducibility. A simple fix would be to set write access on the copied yarn.lock in the staging directory.

Reproduce

(I can only give approximate steps for a standard conda or pip install because I am using nix to install jupyterlab)

  1. install jupyter lab and find the staging directory.
  2. set chmod -w yarn.lock inside of the staging directory
  3. go to a temporary directory somewhere else
  4. run jupyter labextension install <<anyextension>> --app-dir=. --debug

Expected behavior

Jupyterlab with the extension is built successfully in app-dir.

Context

  • Operating System and version: Ubuntu 16.04, Nix package manager
  • JupyterLab version: 1.2.2
@jluttine
Copy link
Contributor

jluttine commented Apr 8, 2021

I opened a PR for nixpkgs to fix it there. Perhaps the patch could be offered to Jupyter Lab too though.

NixOS/nixpkgs#118821

@jluttine
Copy link
Contributor

jluttine commented Apr 8, 2021

Alright, PR opened: #10063

@blink1073
Copy link
Member

Great, thanks @jluttine, I was just about to ask you to do that! 😄

@blink1073 blink1073 added this to the 3.1 milestone Apr 8, 2021
@blink1073 blink1073 added the bug label Apr 8, 2021
@github-actions github-actions bot added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Oct 6, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

No branches or pull requests

3 participants