I am working on a project that is being managed using the bun package manager. But I am habitual to use npm
commands in directories, for installing deps or running the local server.
I am skeptical that using npm inside a directory managed by bun would have some unintended side effects, like unexpected changes to package.lock.json
that might break installation for other developers who use bun.
So, I want a way on my linux (Ubuntu) machine to block myself from using npm commands in this particular directory / repository. Like, if I try to run an npm command, I shall get an error saying npm commands are disabled in this directory. Use bun instead.
, if possible.
I don’t prefer to change PATH specificity to override npm
because each time I shift to an npm project, I would need to change that again. Changing path alias is not a solution I prefer as well because I would need to remember to change it each time I start or finish working. Any other suggestions are welcome.
1