Open jasonkuhrt opened 3 years ago
Sorry, I'm not following. Try to explain the steps you make to get the issue, or maybe there could be a repro example.
A
with a bin specified in package.jsonyalc add A
in some other project B
yalc push
A
A
gets put into B
like normal, but its bin
script is symlinked into B/.yalc/A/
... it should be pointing toward B/node_modules/A
.Right. There seems not need bin sysmlinks are created while add
operation. Will fix it soon.
Also @wclr I am seeing issues with regard to needing to run chmod +x
over the bin file. Maybe related to https://github.com/wclr/yalc/issues/21. I assume package managers do this chmod +x
automatically and its just that yalc
is not right now?
I am seeing issues with regard to needing to run chmod +x over the bin file.
What bin file? Where it is located?
Actually, I'm a little bit confused with this thing with .bin scripts, which was added but a contributor's PR. I generally never use linking and never run into those issue, cause I generally use --pure
adding. I believe linking of bin script from .yalc folder need only if yalc link
or yalc add --link
(yarn's link:
protocol), if just yalc add
is used then PM should take care of installing bin scripts.
I used yalc push --force
and yalc add
.
What bin file? Where it is located?
In the package where run yalc push --force
. The script is listed in package.json
bin
field. Location should not matter. Whatever the value of bin
in package.json
is.
Location should not matter. Whatever the value of bin in package.json is.
I mean is it related to this code?
Do you have the stack trace?
I mean is it related to this code?
Yep seems it would be!
I've found in this situation where you are exclusively working on some ./node_modules/.bin/{foo,bar}
, npm link
(6/7/?) works better than yalc.
One reason I say this is that I found yalc was not installing dependencies
from the external library/npm package. I think with npm link it's irrelevant. Your libraries deps are not mixed into your primary projects node_modules
.
I'm working on a package that has a generated aspect.
It has a CLI to run the generation.
When generation runs, the package expects to find itself within node_modules.
The problem is that the
node_modules/.bin
file symlinks (it seems) to the.yalc
location, rather than thenode_modules/...
location.In turn this breaks my current case since the generated library parts are going into the wrong directory now:
In the above
.yalc
should benode_modules
.