I have installed a local npm package via:
npm i ./my_modules/mypackage
It shows up in my dependencies as:
"dependencies": {
"mypackage": "file:my_modules/mypackage"
}
when I look at the node_modules
folder, it shows up in there as well, but it is not symlinked
there is no arrow icon in the explorer indicating it is symlinked
which means I have to rebuild every single time I want to see changes inside the local package
this only just started happening today, I'm not sure why it's not symlinking all of the sudden
how do I resolve this issue so that it symlinks properly? it used to do this automatically and now it isn't. I've even tried re-installing everything on my dev machine and it is still doing this behaviour.
normally when I install a local npm package it will symlink it properly, automatically
now, for whatever reason, it is not symlinking
EDIT
I've even tried using npm link
cd my_modules/mypackage
npm link
cd ../../
npm link mypackage
npm I ./my_modules/mypackage
still doesn't symlink.
Some conflicts could happen. To resolve that go to the root of your npm package folder and call npm unlink<package_name>
then in your test folder remove node_modules and even you can delete your package.json. After you reset that you can again go to the root of your npm package and call the npm link
then install your local npm package in the test folder and test it out.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.