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)
- missaligned padding for terminal output with failed tasks HOT 1
- Cannot find configuration for task @nx/nx-source:test HOT 2
- Using remark-gfm in generated storybook causes @nx/storybook/plugin to fail
- ReferenceError: jest is not defined on a newly created project HOT 3
- npx nx show projects --affected - Show which files/why it's being triggered HOT 1
- Where Do Incremental Builds Currently Stand? HOT 3
- Inconsistent executors' schema validation
- Nx failed to create new workspace HOT 1
- ----frontendProject param doesn't work as expected HOT 1
- `nx serve` builds, starts server, tells me its hosted and ready, then just exits HOT 5
- Build nextJS app issue - Cannot read properties of null (reading 'message') HOT 2
- generatePackageJson does not include date-fns if there are only slash imports HOT 2
- Error when running tests after clearing jest cache: NX ENOENT: no such file or directory, open when HOT 1
- create-nx-workspace strips version from preset option
- @swc/core peer dependency warnings on fresh Nx 18.3.4 setup for angular/esbuild (windows)
- `nx release` only supports GitHub URLs HOT 1
- react-dom.development.js:26962 Uncaught DOMException: Failed to execute 'createElement' on 'Document': The tag name provided ('/src/assets/illustrations/error.svg?react') is not a valid name.
- vitest with Project Crystal does not work with watch flag
- Webstorm debugger ignores breakpoints after hot-swap in nx app
- Creating a react app using webpack in NX 18 doesn't use historyApiFallback by default HOT 1
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.