fix: switch to nodeModulesDir: "manual" (#3588)

The `"auto"` value causes all kinds of race conditions between various
processes trying to auto install their view of dependencies.
This commit is contained in:
Marvin Hagemeister
2025-10-30 14:50:49 +01:00
committed by GitHub
parent 45bb094bd6
commit 5e94dfe9fd
6 changed files with 129 additions and 28 deletions
+4 -4
View File
@@ -75,12 +75,12 @@ export default {
5. Update your `deno.json` file and add the following `tailwindcss` imports. To
make the
[vscode Tailwind CSS extension](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)
work, we also need to set `"nodeModulesDir": "auto"`. This will create a
`node_modules` directory in your project folder:
work, we also need to set `"nodeModulesDir": "manual"`. This will create a
`node_modules` directory in your project folder when you run `deno install`.
```diff deno.json
{
+ "nodeModulesDir": "auto",
+ "nodeModulesDir": "manual",
"imports": {
"$fresh/": "https://deno.land/x/fresh@1.5.2/",
"preact": "https://esm.sh/preact@10.22.0",
@@ -104,7 +104,7 @@ That's it! Now you can use Tailwind CSS in your project.
> [info]: If you're a vscode user, be sure to install the
> [official Tailwind CSS extension](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)
> to get full intellisense support. For it to work you also need to set
> `"nodeModulesDir": "auto"` in your `deno.json`.
> `"nodeModulesDir": "manual"` in your `deno.json`.
> [warn]: Tailwind CSS doesn't support the grouping syntax from twind:
> `text(lg uppercase gray-100)`. These need to be rewritten to their expanded
+2 -2
View File
@@ -138,12 +138,12 @@ that.
### Usage
1. Set `nodeModulesDir` in `deno.json` to `"auto"` or `"manual"`
1. Set `nodeModulesDir` in `deno.json` to `"manual"`
```diff deno.json
{
"name": "@example/my-cool-project"
+ "nodeModulesDir": "auto",
+ "nodeModulesDir": "manual",
"imports": {
...
}