OIRNOIRO
Denoβ€’5d ago
OIRNOIR

Dismiss nodeModulesDir Warning

My deno project is a monorepo of workspaces. One of these workspaces is delegated to its own git submodule, which is its own git repo. This git repo has its own separate ci and typechecking. Some of its dependencies require that "nodeModulesDir" be set to auto.

In order for everything to work, i need to set "nodeModulesDir": "auto" in both the root deno.json and the deno.json in the submodule, because the submodule needs to be able to compile properly as an independent project. However, when in the context of the root, the following warning is displayed:

Warning "nodeModulesDir" field can only be specified in the workspace root deno.json file.
    at file:///path/to/my/project/submodule/deno.json


I am completely aware that only the root deno.json's property will have any effect when in the context of the root. However, I cannot remove the field from the submodule because it needs to be able to install deps as its own thing. How can I dismiss this warning?
Was this page helpful?