volta-cli / volta

Volta: JS Toolchains as Code. ⚡
https://volta.sh
Other
10.8k stars 226 forks source link

npm scripts are run in wrong npm workspace #1543

Open rdsfj opened 1 year ago

rdsfj commented 1 year ago

Hello 🙋‍♀️

while working on a project with npm workspaces and lerna, we found a bug when running npm scripts. The project contains two npm workspaces (client and universal). In client's package.json, there is a dependency on universal. When running an npm script in both packages using lerna run, volta seems to get confused somehow. volta runs the npm script of only one of the packages, but once in each of the two workspaces.

Here's a repository with a minimal reproduction to make clearer what's happening.

I'm opening the issue here because this bug never occurs when volta is turned off (no $VOLTA_HOME in $PATH). My volta version: 1.1.1

chriskrycho commented 1 year ago

Thanks for the bug report and the minimal reproduction! Further debug/fixing PR welcome, or hopefully one of us will try to get to it eventually. Unfortunately it's very much on the back burner for all of us right now!

rdsfj commented 1 year ago

@chriskrycho Thanks for the reply! Off the top of your head, do you have any ideas what could cause this or how to debug it? I'm not familiar with debugging rust code, but I'll give it a shot.

chriskrycho commented 9 months ago

@rdsfj sorry for the long delay; missed this in the midst of other thing—I have absolutely no idea why that would be happening off the top of my head!