Comments (6)
I managed to install it perfectly with the script on my Mac as indicated in the getting started guide.
With yarn, this also works as expected. I can understand however that this was not clear from my initial question.
But the problem is more that I see no difference in installing with vanilla npm i -g
vs. installing with yarn add global
from a conceptual point of view. Yarn vs. npm5+ should be interchangeable (or that is what I expected anyway, since 95% of all other npm libraries out there will work that way).
The getting started also specifically mentions that the usage of yarn is not a hard requirement, hence this makes it perfectly plausible that others might interpret this the same way and install via npm i -g
as well. This makes it likely they will encounter the same issues I encountered. My intention was merely to document this to save others the same trouble.
In addition if someone were to find a workaround / fix that would be great as well.
According to the getting started:
Yarn does a better job at recognizing and dealing with multiple peer dependencies on globally installed packages, thus is recommended (but not a hard requirement)
See my original issue:
My suspicion is that not using yarn might be the culprit, but then my question is: should it not just work out of the box with "vanilla" npm?
Just putting this here for other people that might also experience the same issue. Would also be nice if we can solve it (willing to contribute).
Thank you for your feedback, it made me realise I needed to give more context to this issue.
from nx.
Awesome, we're on the same page. I had the same suspicions and really appreciate your indepth description of what is going on!
from nx.
@DennisJaamann did you try using yarn to install the packages? I was running into a different issue during the initial install, but the problem was resolved once I went the yarn route recommended by the documentation
from nx.
Related to this issue:
from nx.
We will update the docs site to be more clear about the issues with yarn vs npm.
Most of the schematics in Nx can be used in existing Angular CLI projects so it's possible to install @nrwl/schematics
and @nrwl/nx
into a CLI project and set the default schematic collection to @nrwl/schematics
and be off and running without the need for yarn. Thus the mention of it not being a hard requirement. It's just an issue when you are wanting to create a new project that the npm linking is a problem.
from nx.
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
from nx.
Related Issues (20)
- Failed to process the project graph with "nx-js-graph-plugin" when migrating NX from 16.7.2 to 16.7.4 HOT 2
- Styles cannot be shared across Nx libraries HOT 1
- generatePackageJson should be enabled by default in webpack configuration of @nx/nest applications
- metro web builds cache key collision HOT 5
- NX Missing Platform Dependency HOT 3
- nx@npm:x.x.x [377db] couldn't be built successfully (exit code 129) HOT 5
- nx report shows @nx and @nrwl together HOT 1
- React Native Image on Android fails to display images loaded with `require()` HOT 4
- dependency-check lint rule, --fix needs to be run twice HOT 2
- Reopen Issue #19839: dependentTasksOutputFiles Should Interpolate {projectRoot}
- Dependency Conflict with @nxkit/[email protected] and [email protected] HOT 1
- Invalid /docs URL linked from the "Get started" button on the homepage
- Update Axios for security issues
- @nx/js:tsc --batch not working with dependsOn HOT 3
- Build with generating a `package.json` is missing a GitHub package
- how to achive this in nx?
- how to achive this in nx? __dev__ is undefined HOT 1
- Compiler option for react library generator not adding SWC plugin import when specified HOT 2
- @nx/webpack doesn't add an inferred build task for all the documented webpack config file types HOT 2
- nx-release-publish fails after upgrading to 19.5.X HOT 14
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 nx.