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

Unable to recreate a yarn.lock #15829

Closed
davidbrochart opened this issue Feb 20, 2024 · 1 comment
Closed

Unable to recreate a yarn.lock #15829

davidbrochart opened this issue Feb 20, 2024 · 1 comment
Labels

Comments

@davidbrochart
Copy link
Contributor

Description

I thought it would be possible to recreate a yarn.lock, by removing it and invoking jlpm, but I get this error at jlpm run build:

> @jupyterlab/buildutils@4.1.2 build
> tsc && cd template && npm run build

../node_modules/@yarnpkg/fslib/lib/ZipFS.d.ts:208:5 - error TS2416: Property 'readdirPromise' in type 'ZipFS' is not assignable to the same property in base type 'BasePortableFakeFS'.
  Type '{ (p: import("/home/david/tmp/jupyterlab/node_modules/@yarnpkg/fslib/lib/path").PortablePath): Promise<import("/home/david/tmp/jupyterlab/node_modules/@yarnpkg/fslib/lib/path").Filename[]>; (p: import("/home/david/tmp/jupyterlab/node_modules/@yarnpkg/fslib/lib/path").PortablePath, opts: { ...; } | null): Promise<......' is not assignable to type '{ (p: import("/home/david/tmp/jupyterlab/node_modules/@yarnpkg/fslib/lib/path").PortablePath): Promise<import("/home/david/tmp/jupyterlab/node_modules/@yarnpkg/fslib/lib/path").Filename[]>; (p: import("/home/david/tmp/jupyterlab/node_modules/@yarnpkg/fslib/lib/path").PortablePath, opts: { ...; } | null): Promise<......'. Two different types with this name exist, but they are unrelated.
    Type 'Promise<Filename[]>' is not assignable to type 'Promise<Dirent[]>'.
      Type 'Filename[]' is not assignable to type 'Dirent[]'.
        Type 'Filename' is not assignable to type 'Dirent'.
          Type 'String & { __pathType: PathType.File; }' is missing the following properties from type 'Dirent': isFile, isDirectory, isBlockDevice, isCharacterDevice, and 5 more.

208     readdirPromise(p: PortablePath): Promise<Array<Filename>>;
        ~~~~~~~~~~~~~~

Reproduce

  1. git clone https://github.com/jupyterlab/jupyterlab.git
  2. cd jupyterlab
  3. pixi init
  4. pixi add pip nodejs
  5. pixi shell
  6. pip install hatch
  7. pip install -e .
  8. rm yarn.lock
  9. jlpm
  10. jlpm run build

This issue suggests that this issue has been fixed in later version of yarn, but it seems that JupyterLab vendors yarn v3.5.0.

Expected behavior

We should be able to recreate a yarn.lock.

Context

  • Operating System and version: Linux Ubuntu 22.04
  • Browser and version: N/A
  • JupyterLab version: main branch
@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to new issues that need triage label Feb 20, 2024
@JasonWeill JasonWeill removed the status:Needs Triage Applied to new issues that need triage label Feb 20, 2024
@krassowski
Copy link
Member

I think this can be closed since #15996 bumped the yarn version used in buildutils to fix this issue, see comments #15996 (comment) and #15996 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants