You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I verified that the issue exists in the latest pnpm release
pnpm version
8.15.5
Which area(s) of pnpm are affected? (leave empty if unsure)
CLI, Hooks
Link to the code that reproduces this issue or a replay of the bug
No response
Reproduction steps
In a monorepo organized by pnpm workspace:
pkg A has a prepare scripts to build itself and output to dist/ folder
{
"name": "A",
"version": "0.0.0",
"scripts": {
"prepare": "(build scripts)",
},
"publishConfig": {
"directory": "dist"
}
}
pkg B use pkg A in workspace with injected flag
{
"name": "B",
"version": "0.0.0",
"scripts": {
"prepare": "(build scripts)",
},
"dependencies": {
"A": "workspace:^"
},
"dependenciesMeta": {
"A": {
"injected": true
}
}
}
run pnpm install in pkg B, will get a response
ENOENT ENOENT: no such file or directory, scandir '..../A/dist'
Describe the Bug
in workspace, pnpm run install command in A & B with following order:
parallel install deps of A & B
run prepare scripts of A
run prepare scripts of B
but to install deps of B, firstly it needs to run the prepare scripts of A.
without injected flag, pnpm can still create a symbol link to the unexist dist/ folder.
with injected flag, pnpm can only throw an error.
Expected Behavior
with injected flag, the order should be:
install deps of A
run prepare scripts of A
install deps of B
run prepare scripts of B
or give a option to disable parallel install.
Which Node.js version are you using?
18.18.2
Which operating systems have you used?
macOS
Windows
Linux
If your OS is a Linux based, which one it is? (Include the version if relevant)
No response
The text was updated successfully, but these errors were encountered:
If you ignore shared-workspace-lockfile=false, the prepare script of the injected package is executed prior to the consuming package and everything is fine. But if you set shared-workspace-lockfile=false, the prepare script of the injected package is skipped before the prepare script of the consuming package is executed
thx a lot for @alvis 's work.
I've rechecked my repo's pnpm config and unfortunately found the shared-workspace-lockfile=false.
Hope that this issue will be fixed soon or I need to consider whether to ignore that config.
Verify latest release
pnpm version
8.15.5
Which area(s) of pnpm are affected? (leave empty if unsure)
CLI, Hooks
Link to the code that reproduces this issue or a replay of the bug
No response
Reproduction steps
In a monorepo organized by pnpm workspace:
pkg A has a prepare scripts to build itself and output to dist/ folder
{
"name": "A",
"version": "0.0.0",
"scripts": {
"prepare": "(build scripts)",
},
"publishConfig": {
"directory": "dist"
}
}
pkg B use pkg A in workspace with injected flag
{
"name": "B",
"version": "0.0.0",
"scripts": {
"prepare": "(build scripts)",
},
"dependencies": {
"A": "workspace:^"
},
"dependenciesMeta": {
"A": {
"injected": true
}
}
}
run
pnpm install
in pkg B, will get a responseENOENT ENOENT: no such file or directory, scandir '..../A/dist'
Describe the Bug
in workspace, pnpm run install command in A & B with following order:
but to install deps of B, firstly it needs to run the prepare scripts of A.
without injected flag, pnpm can still create a symbol link to the unexist dist/ folder.
with injected flag, pnpm can only throw an error.
Expected Behavior
with injected flag, the order should be:
or give a option to disable parallel install.
Which Node.js version are you using?
18.18.2
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
No response
The text was updated successfully, but these errors were encountered: