I created some executable in my project and defined the commands in the bin property in package.json
"bin": {
"cmd1": "./scripts/cmd1.js",
"cmd2": "./scripts/cmd2.js",
}
Then I ran npm link, symlinks were created in .nvm/versions/node/v16.13.0/bin (because I am using nvm).
The thing is, after I updated my scripts (cmd1.js / cmd2.js), it doesn't seem like the changes are reflected when I run cmd1 or cmd2. It looks like I will have to remove the executables in .nvm/versions/node/v16.13.0/bin, and run npm link again. Seems like a hassle. And npm unlink doesn't work at all because it shows "Must provide a package name to remove" but I am not unlinking another package.
How to solve this situation?