I have two separate projects that use npm - so I have both : some_base_folder/projectA/package.json and some_base_folder/projectB/package.json
some_base_folder/projectA/package.json
some_base_folder/projectB/package.json
I ended up using:
"scripts": { "job": "cd ./sub && \"$npm_execpath\" run subjob", ... }
because this also works with yarn.