You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
copier copy https://github.com/jupyterlab/extension-template .
🎤 What is your extension kind?
frontend
🎤 Extension author name
Bo
🎤 Extension author email
ben.bob@gmail.com
🎤 JavaScript package name
myextension
🎤 Python package name
myextension
🎤 Extension short description
A JupyterLab extension.
🎤 Does the extension have user settings?
No
🎤 Do you want to set up Binder example?
No
🎤 Do you want to set up tests for the extension?
No
🎤 Git remote repository URL
https://github.com/github_username/my-extension
npm install
npm run build
> myextension@0.1.0 build
> jlpm build:lib && jlpm build:labextension:dev
Internal Error: myextension@workspace:.: This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile
at q0.getCandidates (/Users/bpeng/anaconda3/envs/vatlab/lib/python3.10/site-packages/jupyterlab/staging/yarn.js:435:5145)
at xf.getCandidates (/Users/bpeng/anaconda3/envs/vatlab/lib/python3.10/site-packages/jupyterlab/staging/yarn.js:391:1264)
at /Users/bpeng/anaconda3/envs/vatlab/lib/python3.10/site-packages/jupyterlab/staging/yarn.js:439:7693
at ff (/Users/bpeng/anaconda3/envs/vatlab/lib/python3.10/site-packages/jupyterlab/staging/yarn.js:390:11070)
at ge (/Users/bpeng/anaconda3/envs/vatlab/lib/python3.10/site-packages/jupyterlab/staging/yarn.js:439:7673)
at async Promise.allSettled (index 0)
at async to (/Users/bpeng/anaconda3/envs/vatlab/lib/python3.10/site-packages/jupyterlab/staging/yarn.js:390:10398)
at async /Users/bpeng/anaconda3/envs/vatlab/lib/python3.10/site-packages/jupyterlab/staging/yarn.js:439:8205
at async ti.startProgressPromise (/Users/bpeng/anaconda3/envs/vatlab/lib/python3.10/site-packages/jupyterlab/staging/yarn.js:390:47579)
at async je.resolveEverything (/Users/bpeng/anaconda3/envs/vatlab/lib/python3.10/site-packages/jupyterlab/staging/yarn.js:439:6233)
yarn install as suggested
$ yarn install
yarn install v1.22.18
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning "@jupyterlab/application > @jupyterlab/ui-components@4.0.5" has unmet peer dependency "react@^18.2.0".
warning "@jupyterlab/application > @jupyterlab/services > @jupyterlab/settingregistry@4.0.5" has unmet peer dependency "react@>=16".
warning " > css-loader@6.8.1" has unmet peer dependency "webpack@^5.0.0".
warning " > style-loader@3.3.3" has unmet peer dependency "webpack@^5.0.0".
warning " > source-map-loader@1.1.3" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
[4/4] 🔨 Building fresh packages...
success Saved lockfile.
✨ Done in 24.96s.
the problem persists.
$ npm run build
> myextension@0.1.0 build
> jlpm build:lib && jlpm build:labextension:dev
Internal Error: myextension@workspace:.: This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile
at q0.getCandidates (/Users/bpeng/anaconda3/envs/vatlab/lib/python3.10/site-packages/jupyterlab/staging/yarn.js:435:5145)
at xf.getCandidates (/Users/bpeng/anaconda3/envs/vatlab/lib/python3.10/site-packages/jupyterlab/staging/yarn.js:391:1264)
at /Users/bpeng/anaconda3/envs/vatlab/lib/python3.10/site-packages/jupyterlab/staging/yarn.js:439:7693
at ff (/Users/bpeng/anaconda3/envs/vatlab/lib/python3.10/site-packages/jupyterlab/staging/yarn.js:390:11070)
at ge (/Users/bpeng/anaconda3/envs/vatlab/lib/python3.10/site-packages/jupyterlab/staging/yarn.js:439:7673)
at async Promise.allSettled (index 0)
at async to (/Users/bpeng/anaconda3/envs/vatlab/lib/python3.10/site-packages/jupyterlab/staging/yarn.js:390:10398)
at async /Users/bpeng/anaconda3/envs/vatlab/lib/python3.10/site-packages/jupyterlab/staging/yarn.js:439:8205
at async ti.startProgressPromise (/Users/bpeng/anaconda3/envs/vatlab/lib/python3.10/site-packages/jupyterlab/staging/yarn.js:390:47579)
at async je.resolveEverything (/Users/bpeng/anaconda3/envs/vatlab/lib/python3.10/site-packages/jupyterlab/staging/yarn.js:439:6233)
Tried yarn cache clean and the problem persists.
Expected Result:
npm run build should pass with the test project. I was actually working on my own extension and got really confused with this error, then I found that it might not be a problem with my own project but with the toolchain that I am using.
Have you tried running only jlpm, not yarn or npm? Despite what the errors say, jlpm is a name for our use of yarn, so using jlpm consistently will ensure that you get the same version every time. jlpm is Yarn v3 in JupyterLab v4, but your system has yarn v1.
We may need to update the documentation if it makes reference to yarn and npm.
It was very confusing when I noticed that yarn 1.22.19 is the latest version on npm. Then searching for Yarn 3 lands me at this post and command
yarn set version stable
which changed my yarn to
> yarn --version
3.6.3
and the project can now be compiled successfully.
Note: I did not notice the information on version of Yarn on the developer guide, but I should have read the extension migraiton guide, which mentions Yarn 3.
Bug Report
Steps to Reproduce:
test_extension
npm install
npm run build
yarn install
as suggestedyarn cache clean
and the problem persists.Expected Result:
npm run build
should pass with the test project. I was actually working on my own extension and got really confused with this error, then I found that it might not be a problem with my own project but with the toolchain that I am using.Environment:
The text was updated successfully, but these errors were encountered: