I’m currently switching to pnpm from yarn (v1) in our project. Most things worked or I managed to fix them but I hit a snag with running lint tasks with eslint.
The error is the following:
[lint:js] ESLint couldn't find the plugin "eslint-plugin-n".
[lint:js]
[lint:js] (The package "eslint-plugin-n" was not found when loaded as a Node module from the directory "/app/ember_app".)
Since this worked fine in yarn, my hunch is that pnpm doesn’t place eslint-plugin-n
as top-level folder in node_modules
. I checked twenty times and eslint-plugin-n
is a direct (dev)dependency of the project.
To complicate matters, eslint works perfectly locally, the above error is only produced on the CI server. I use pnpm install --frozen-lockfile
there, to make sure I get the same node_modules structure.
The project uses eslint 8.43.0 and pnpm 6.9.0.
Do you have an idea about what could cause this and how to fix it?
Thanks so much,
Balint