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)
- nx process exited with code 9 (after upgrade to 18.3.2 from 16.3.2) HOT 4
- convert to inferred doesn't work for jest if project has a library
- nx local-registry fails with an exception: 'registry' is not a valid npm version HOT 1
- `show project`: renders duplicate target when using inferred task from `package.json#scripts` HOT 1
- Local executor changes not affects consumers HOT 2
- NX Failed to process project graph. Pass --verbose to see the stacktraces. ( Windows 10) HOT 3
- Target fails with @nx/rollup:rollup executor on NX 19.5.3
- NX dependency graph not working with gradle project
- Nx angular dynamic mfe got NG0203 error HOT 1
- nx release: add support for access option when publishing to npm HOT 1
- Updating to 19.5.3 breaks e2e parallelism
- Can't generate storybook config HOT 1
- NX spawnSync ASIAYS2NUFNNVLUZ7YPA ENOENT HOT 1
- request to add migration to storybook 8 using nx schematic generator in upcoming version HOT 1
- Error: EPERM: operation not permitted, unlink '\.nx\workspace-data\d\daemon.log' HOT 2
- namedInputs are not considered when calculating nx affected
- @nx/rspack:dev-server executor is missing some @nx/webpack:dev-server options
- NX error after updating to 19.5.3 HOT 1
- withModuleFederation plugin overwrites config.optimization options
- removing old cache entries not working
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.