Deno Monorepo with nested applications and packages
I'm trying to move a node monorepo from NPM to Deno. It's got a set of applications in a directory called
services
, and set of libraries used by said services in packages
. These are all independent, and are registered to the apps workspace (@example
) for now. eg: if a service myapp
registered as @example/myapp
wanted packages/utils, it'd import @example/utils
and it'd find it within packages.
I'm trying to do the same in NPM but it seems like everything has to be flat, at the root. Am I not able to register workspaces that are deeper than the root directory?
I've got /packages/foo/deno.json
and packages/foo/mod.ts
with a funciton exported. the deno.js has the following contents:
The root project has this deno.json:
I'm unable to import @example/foo
in API, as it says ..
The goal is to run these in docker containers in skaffold.5 Replies
You can use glob expressions for workspace like ./services/*
I'm unable to import @example/foo in API, as it says ..Regarding this: Have you added
@example/foo
to the imports section of the consuming package's deno.json
?i have the same issue, i created an example repo what i am trying to do. Maybe i am using it wrong.
Is there a best practice how to make it work ? https://github.com/ErfanNaz/deno-nested-workspace-example
GitHub
GitHub - ErfanNaz/deno-nested-workspace-example
Contribute to ErfanNaz/deno-nested-workspace-example development by creating an account on GitHub.
Right, nested workspaces are not supported in Deno. Relevant issue https://github.com/denoland/deno/issues/26879
ohh thanks for the quick answer (subscribed) 🙂 i will use fore now just one workspace