Feat[init]: Add "nodeModulesDir": "auto" to the deno.json in the freshv2 init script #2973 #2813
The issue in #2973 appears to be caused by multiple cached versions of dependencies. After directly deleting the ~/.cache/deno directory, the problem was resolved. Enabling nodeModulesDir: "auto" can also avoid this issue. Upon checking the requirement in #2813, it suggests changing "nodeModules": "true" to the recommended "auto" in Fresh v1, while Fresh v2 does not have this setting. Considering these two issues, the configuration in Fresh v1, and future support for Fresh plugins (such as Tailwind v4), I believe adding "nodeModulesDir": "auto" to the init script would be beneficial in many aspects.
Also re-edit the test_utils to add functions for re-deleting the tmp directory and setting timeouts, due to permission issues on Github CI testing in Win env.
Closes #2973 Closes #2813
--patch-1 As suggested by @cvsn, the code has been provided to fix the CI failure caused by permission denial of temporary files in the Windows environment on GitHub CI.
Looks like this was already merged as part of https://github.com/denoland/fresh/pull/3054