MODULE_NOT_FOUND when automd@0.4.1
work with jiti@2.4.2
Environment
- node
22.14.0
- pnpm
10.16.1
- operating system
window 10
Reproduction
github repo
github workflow
- https://github.com/ruan-cat/monorepo/actions/runs/17734816290
- https://github.com/ruan-cat/monorepo/actions/runs/17735967204
Describe the bug
I am not a native English speaker. The following content has all been translated using translation software.
Suddenly, I received an error message from GitHub Actions, stating that automd
couldn't find the jiti
module.
Currently, I am temporarily resolving this issue by overriding the versions of the dependent packages. I hope you can fix the problem between these two packages.
yaml
# pnpm-workspace.yaml
overrides:
"automd@^0.4.1": "0.4.0"
"jiti@^2.4.2": "2.4.1"
In the smallest reproducible case, the result of the reproduction is shown in the following figure .
After ignoring the configuration for the application dependency package, reinstall the dependencies.
Re-running the "automd" command solved the problem.
Logs
log
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/runner/work/monorepo/monorepo/node_modules/.pnpm/automd@0.4.1/node_modules/automd/node_modules/.pnpm/jiti@2.4.2/node_modules/jiti/lib/jiti.mjs' imported from /home/runner/work/monorepo/monorepo/node_modules/.pnpm/automd@0.4.1/node_modules/automd/dist/cli.mjs