jupyterlab / extension-template

A `copier` template for JupyterLab extensions
Creative Commons Zero v1.0 Universal
52 stars 16 forks source link

Check-release action in fails on `check-npm` #36

Closed krassowski closed 1 year ago

krassowski commented 1 year ago

I am not sure if this is a bug in the template or jupyter-releaser, but I saw this issue across two unrelated repositories, for example see runs:

It looks like this:

Extracting 1 packages...
stderr:
 npm ERR! code 1
npm ERR! path /tmp/tmp0fk9x1hn/staging/@axlair/jupyterlab_vim
npm ERR! command failed
npm ERR! command sh -c jlpm run clean && jlpm run build:prod
npm ERR! Usage Error: The nearest package directory (/tmp/tmp0fk9x1hn/staging/@axlair/jupyterlab_vim) doesn't seem to be part of the project declared in /tmp/tmp0fk9x1hn.
npm ERR!
npm ERR! - If /tmp/tmp0fk9x1hn isn't intended to be a project, remove any yarn.lock and/or package.json file there.
npm ERR! - If /tmp/tmp0fk9x1hn is intended to be a project, it might be that you forgot to list staging/@axlair/jupyterlab_vim in its workspace configuration.
npm ERR! - Finally, if /tmp/tmp0fk9x1hn is fine and you intend staging/@axlair/jupyterlab_vim to be treated as a completely separate project (not even a workspace), create an empty yarn.lock file in it.
npm ERR!
npm ERR! $ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] <scriptName> ...

npm ERR! A complete log of this run can be found in: /home/runner/.npm/_logs/2023-07-30T02_51_39_915Z-debug-0.log

I thought it is a berry issue at first, but now I wonder if maybe the template is missing something? Anyone else saw this?

fcollonval commented 1 year ago

I see this one in https://github.com/jupyterlab-contrib/jupyterlab-tour/actions/runs/5706046304/job/15461350712?pr=71 too

fcollonval commented 1 year ago

I found the culprit: before we were using a prepare script in package.json - it is not removed when apply the upgrade_extension helper

https://github.com/jupyterlab-contrib/jupyterlab-tour/pull/71/commits/e492dd6652f107d27a2ecace4286e7bc9b68b309

So I guess this requires a fix in JLab core.