Comments (4)
+1, I have the same bug in one of my workspaces, worked perfectly with the last pnpm 8.15.7.
from pnpm.
Hi! in the package.json
of @nighttrax/bar
, is there any reason the local dependency is not specified with the workspace:
prefix? If it's for package publishing, you can use pnpm publish
and pnpm will remove the prefix in the published package. (same with pnpm pack
)
{
"dependencies": {
"@nighttrax/foo": "workspace:~1.0.0"
}
}
With this change, in my side the command runs correctly (it has an error in a nextjs app, but does not seem related to pnpm). Thanks in advance!
EDIT:
The reason for the issue in the v9 update is a breaking change. More information here.
link-workspace-packages
is now false by default.
from pnpm.
@nachoaldamav thanks for spotting that, I guess it's just a relic from the beginning of the repo. Using the workspace:
protocol does indeed fix the issue.
Regarding the link-workspace-packages
breaking change, I think something else is breaking the behaviour of run -r
. The lockfile suggests that the package is linked, and AFAICT pnpm i
with v9 doesn't change that part of the lockfile while upgrading to the v9 format. Checking node_modules
corroborates that. Moreover, building packages/foo
manually before building packages/bar
fixes the error, so it looks like an execution order problem with pnpm -r
.
The use case from https://pnpm.io/workspaces fits my repo:
By default, pnpm will link packages from the workspace if the available packages match the declared ranges. For instance, [email protected] is linked into bar if bar has "foo": "^1.0.0" in its dependencies and [email protected] is in the workspace.
However, that only mentions linking, which seems to still work correctly in v9.
Since using workspace:
fixes the problem, is there some other breaking change for v9 run -r
that doesn't consider foo: ~1.0.0
a workspace dependency anymore?
Edit: hmm, setting link-workspace-packages=false
makes run -r
work as expected with v9. The docs seem misleading to me, as they talk about linking and node_modules
, not about running scripts.
from pnpm.
EDIT: The reason for the issue in the v9 update is a breaking change. More information here.
link-workspace-packages
is now false by default.
@nachoaldamav Thanks for this, adjusting this option works for me 👍
I cannot switch (yet) to pnpm publish
and workspace:*
everywhere because semantic-release
doesn't officially support pnpm to publish packages.
from pnpm.
Related Issues (20)
- Wrapper script breaks with home being in /var HOT 1
- ERR_PNPM_LINKED_PKG_DIR_NOT_FOUND in pnpm deploy HOT 2
- native build not triggered when lib has gyp
- PNP mode doesn't work with modules prefixed with 'node:' HOT 1
- Issues with mulitple version of drizzle-orm between different packages in workspace HOT 3
- Filtered install should work only on an up-to-date lockfile HOT 1
- Can not change the dependencies version in .pnpmfile.cjs HOT 5
- pnpm install --dir . fails when deps has npx in install script
- ajv 8.15 caused the problem, I'm not sure if the pnpm up report is a bug or not HOT 2
- peer dependency issue with pnpm deploy
- Can't use specifier for a snapshot dependency in the lock file HOT 13
- Updating to pnpm 9 cause `pnpm install` to look for a workspace dependency on npm HOT 3
- install script throws ETXTBSY ETXTBSY: text file is busy, copyfile '/tmp/tmp.rPcedmGtun/pnpm' -> '/home/capaj/.local/share/pnpm/pnpm'
- v9.2.0 `pnpm --filter=mypackage exec some-command` produces unexpected output HOT 2
- ERR_PNPM_NO_MATCHING_VERSION HOT 1
- Error installing `parcel` (ELIFECYCLE - exit code 126) HOT 3
- `pnpm fetch` fails if at least one injected workspace dependency exists in the monorepo
- Monorepo resolve error when using nextui. HOT 2
- `pnpm update` does not patch update `0.x` production dependencies HOT 2
- Option to ignore carets HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pnpm.