Engineer | Lover of dogs, books, and learning | Dos XX can be most interesting man in the world, I'm happy being the luckiest. | I write about what I learn @ code-comments.com
Engineer | Lover of dogs, books, and learning | Dos XX can be most interesting man in the world, I'm happy being the luckiest. | I write about what I learn @ code-comments.com
Engineer | Lover of dogs, books, and learning | Dos XX can be most interesting man in the world, I'm happy being the luckiest. | I write about what I learn @ code-comments.com
Engineer | Lover of dogs, books, and learning | Dos XX can be most interesting man in the world, I'm happy being the luckiest. | I write about what I learn @ code-comments.com
What I've had to do is go back to whatever state has the files/folders that npm is looking for. So let's say you have a package that is on one branch and not on another, you'd have to go back to your other branch and run npm link again for that package before running npm unlink my-package-name in your main project
Yep! If you don't include --no-save you'll end up removing that package from your package.json file. Of course, if you don't want to include the unlinked package in your package.json file, you can exclude the --no-save
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks Erin! This is exactly the situation I found myself in. Appreciate the write up!
Out of curiosity though -- why is the
--no-save
flag important?Looks like
unlink
is an alias foruninstall
, so the--no-save
means uninstall, but don't remove fromnode_modules
?Found this helpful - medium.com/dailyjs/how-to-use-npm-...
Also... let's say you do goof and get the
ENOENT: no such file or directory, access '/...
error... then what?What I've had to do is go back to whatever state has the files/folders that npm is looking for. So let's say you have a package that is on one branch and not on another, you'd have to go back to your other branch and run
npm link
again for that package before runningnpm unlink my-package-name
in your main projectYou may also go to the folder where the symbolic link library is installed and deleted the folder.
Yep! If you don't include
--no-save
you'll end up removing that package from your package.json file. Of course, if you don't want to include the unlinked package in your package.json file, you can exclude the--no-save