Replies: 2 comments
-
|
hey, thanks for this report. we currently are actively changing the infrastructure regarding buckets and other parts, which is why minio and fake-gcs-server are currently both being used. i wont update the readme until these infrastructure migrations are complete, as they are not fully concrete yet (and honestly not aware anyone self-hosting JSR yet 😅 ). in #1309 the running & initial setup of JSR will be easier. |
Beta Was this translation helpful? Give feedback.
-
|
thanks for the update and the links! I am happy to test new versions. I have been building docker-based tooling for dev envs for quite some time and recognize the many pitfalls :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I recently set up a local JSR instance to test publishing and consuming packages with a real application (melker).
I am slightly paranoid, and I thus never want to publish a real version unless I can preview/understand the exact results.
TL;DR It works fine running locally (linux, deno 2.6+), but is a bit tricky.
Below is a summary of the issues encountered and some suggestions for improvement. Sorry if I missed
something already documented or just misread the docs. If so, just ignore those suggestions. Also, thanks,
for the great work on JSR!
Some prerequisites not documented
minio,fake-gcs-server) but isn't listed as a prerequisite. Without it, the binaries are just LFS pointers and fail withExec format error.const PORT = 80inlb/local.tswith no env override. Workaround:sudo setcap 'cap_net_bind_service=+ep' $(which deno).Likely bug:
docsbucket not created in MinIOlb/local.ts(lines 59-64) creates themodules,docs, andnpmbuckets in fake-GCS, and onlypublishingin MinIO. However, the API (api/src/main.rs:192) createsdocs_bucketas ans3::Bucket— meaning it writes documentation to MinIO, not GCS. Thedocsbucket is never created in the right storage backend, causing all publishes to fail with:The fix was quick: add
createMinioBucket("docs")alongsidecreateMinioBucket("publishing")inlb/local.ts.Publishing
@stdrequires multiple manual workaroundsThe README suggests publishing
deno_stdto populate the registry. This is needed for core publishing tasks.In practice this requires:
psqlstdscope via the admin panelnew_package_per_week_limitfrom its default of 20 -@stdhas 42 packages. This can be done through the admin UI once you have access, but requires the staff bootstrapping problem to be solved first.LICENSEfile into each package subdirectory. The Deno CLI's workspace publish doesn't inherit the root LICENSE into sub-packages, anddeno_stddoesn't ship individual LICENSE files per package. This is a Deno CLI limitation, but it's a friction point when following the README's instructions.publishing_tasksfrom the database after the docs bucket failure described above.No way to mirror packages from production
If your application depends on third-party JSR packages (in my case, it was luckily exactly one,
@zaubrik/djwt), there's no import/mirror functionality. Each package must be manually:deno.jsonmodified to add JSR config (name, version, exports)--no-checkif there are type errors with newer Deno versionsThis makes testing real-world applications with dependency trees impractical.
Suggestions
Quick wins:
git-lfsto the prerequisites in the READMEdocsbucket creation inlb/local.ts- addcreateMinioBucket("docs")alongsidecreateMinioBucket("publishing")deno task bootstrapscript that creates a staff user, bumps scope limits, and sets up common scopesMedium-term improvements:
@stdend-to-end (handles scope creation, limit bumps, package pre-creation, and publish)Longer-term ideas:
jsr mirror @scope/package@version- fetch a published package from production JSR and republish it locally, including transitive dependencies. I realize this could be complex.deno task bootstrap- a one-command setup that bootstraps the DB, creates a staff user, publishes@std, and verifies the full stack is workingBeta Was this translation helpful? Give feedback.
All reactions