Example of a monorepo using Pnpm and Nx.
This example is used in the next blog posts:
Example of a monorepo using Pnpm and Nx
License: MIT License
Example of a monorepo using Pnpm and Nx.
This example is used in the next blog posts:
Pnpm and Nx.dev versions should be upgraded
I think this repo is package-based.
How pnpm works with integrated nx repo?
Hey @javierbrea,
thanks for this post https://www.javierbrea.com/blog/pnpm-nx-monorepo-02/. I build a mono-repo based on your guide. I have one app named myapp
and two packages named shared-ui
and shared-features
.
To build myapp
I have following nx-configuration:
"targetDependencies": {
"start": [
{
"target": "build",
"projects": "dependencies"
}
]
}
I think nowadays, it could be changed to:
"targetDefaults": {
"start": {
"dependsOn": ["^build"]
}
}
Doesn't matter! Either way, I get the following error when I try to start myapp and use latest nx. The packages are built properly, but the myapp
start fails.
f I call pnpm nx start myapp
, I get following error:
dist/select-utils-14284a03.js 2.84 kB │ gzip: 1.06 kB
✓ built in 3.01s
> nx run myapp:start
Could not find 'nx' module in this workspace. Error: Invalid source or target versions. Source: 5.0, Target: 5.1.
Only backwards compatibility between "5.1" and "5.0" is supported.
This error can be caused by "@nrwl/..." packages getting out of sync or outdated project graph cache.
Check the versions running "nx report" and/or remove your "nxdeps.json" file (in node_modules/.cache/nx folder).
It seems the reason is, that nx
is installed as a dep of the workspace, as you also prefer and therefore nx run myapp:start
get called without pnpm
prefixed. What do you think. Do you know, how I can fix this?
Thanks and best regards!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.