-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when using 'postinstall' in a yarn workspace's package #7694
Comments
Same Error and I using: |
Same Error when try to execute electron-rebuild in the postinstall of a package. This only happens in windows. In Linux is working properly. |
Experiencing same problem on Windows 10, with postinstall trying to find the module under |
What is the state of this? I can't execute |
Hi, I'm facing the same issue here. Environment:
Description:
Trace:
Some more details: Contents of
It seems that the path Hence we lookup for the binary inside One can notice there is also a windows shell script named tsc.cmd that follows the same (flawed ?) logic. Fun fact: Question: |
Same issue here, it is trying to resolve to Windows 10 Putting the |
putting `postinstall`s inside packages' own `package.json` gives weird errors. see: yarnpkg/yarn#7694 (comment)
1. Yarn workspaces has problems dealing with `postinstall` scripts ( see: yarnpkg/yarn#7694 ) 2. I don't remember the reason I added them in the first place. Only `backend` had one and it was running the `generate` script. Since `generate` is being run before every launch already, it is unnecessary to run it after an install.
I have the same problem, but trying to postinstall in my monorepo Husky o Lefthook in windows with yarn 1.22.22 |
Do you want to request a feature or report a bug?
I'm reporting a bug.
If the current behavior is a bug, please provide the steps to reproduce.
When using Yarn workspaces with the configuration below:
The
postinstall
script insideserver/package.json
cannot run properly. It tries to invoke a binary of its own dependency, as seen below:And the following error gets thrown when executing
yarn
from the root directory:As it can be seen, it tries to invoke
D:\Development\Projects\app\node_modules\node_modules\prisma2\build\index.js
, which does not exist. When runningyarn
from the 'server' directory, everything works as expected.I think that before executing
postinstall
scripts for each package, the current directory should be modified to simulate execution straight from the package instead of the workspace root.Please mention your node.js, yarn and operating system version.
Node.js: 12.11.1
Yarn: 1.19.1
Windows 10 x64
The text was updated successfully, but these errors were encountered: