hey try using npx to call the locally installed nodemon or update your path to include ./node_modules/.bin - that should force npm to pick the local module over the global installed one. hope it helps!
Considering similar issues in my projects, I found that explicitly calling the local node_modules folder in my npm scripts yielded consistent results. Instead of relying on the system PATH, I configured package.json so that it references the executable with an absolute path such as ‘./node_modules/.bin’. This avoids discrepancies between different environments and makes the local execution of commands more reliable. Adjusting paths directly has saved me from debugging path conflicts and provided a more streamlined development process.
In my experience, resolving issues related to local versus global dependency resolution can be tricky, especially when unexpected behavior arises from the system using the wrong executable. I encountered a similar problem in one of my projects where the global nodemon was overshadowing the local one. After several troubleshooting attempts, I ended up modifying my package.json scripts to call the executable directly from the local node_modules folder. This method proved to be reliable and reduced the overhead of debugging path issues. Consistently using local binaries has improved project stability and streamlined my device setups.