Comments (2)
The short explanation is that a plugin failing to construct nodes means that Nx cannot properly construct a task graph for running any tasks. The plugin could have constructed a node which should have been depended upon by the task being run.
The long explanation is...
- To run tasks, Nx creates a Task Graph.
- The Task Graph is a function of the Project Graph. The definition of projects, and the relationships between them are used to create a task graph with relationships between tasks.
- Nx uses plugins to construct the project graph based on config files in the repo.
So to put it all together in a concrete example...
A serve task you are running could be configured as such meaning that it depends on the build of any of it's dependencies:
{
dependsOn: ['^build']
...
}
Now, we know.. there's no way that the jest
plugin which only ever defines test
targets is going to change this execution... but nothing specifies this to Nx.
So if the jest
plugin fails to create nodes.. it could have failed to do any number of things it intended to do.
- It failed to create a test target totally unrelated to the serve task above (this is the reality)
- It failed to create a build target which would be related to the serve task above
- It creates a different serve target for that same project which would mean.. the target which should be run should be completely different if the plugin does not fail.
Ultimately, the Project Graph was not constructed properly.. and Nx is not sure what is missing and whether or not it is important to running the tasks. So Nx will error before running any task.
Does this make sense and answer your question as to why failing to parse a vite.config.js
is a catastrophic failure?
As for the vite
failure, if you have any more questions there, @Coly010 could maybe help you.
from nx.
I realize this could be specific to the UnoCSS from 'unocss/vite'
imports configuration for exports, but what I am not understanding is why unrelated projects break with this and why I can't run things like nx report
because of a simple import error in an unrelated project. I also kept seeing Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it.
so I wanted to report the issue.
My vite config us using:
commonjsOptions: {
transformMixedEsModules: true,
},
So I am not sure why such a small thing could break other projects.
from nx.
Related Issues (20)
- Cross-release-group dependency leads to error: `Version data key "project-name" already exists in version data` HOT 1
- When I try to generate a Vue 3 app using @nx/vue, it throws error
- Cannot set experimentalDecorators: false for @nx/angular:ng-packagr-lite builder HOT 2
- (intermediate value).compileString is not a function HOT 1
- enable polyfills for older browsers HOT 2
- `nx release`: changelog of independent project include workspace changes HOT 4
- Unable to start expo app when not using app.json file HOT 2
- Daemon crashes when executing nx command in postinstall hook (bun) HOT 1
- All nx commands are failing HOT 1
- 19.2.0 update broke many generators (including @nx/next) HOT 2
- Re-open: Default tsconfig sourceMap setting produces invalid sourceMap for publishable packages HOT 1
- Re-open: Default tsconfig sourceMap setting produces invalid sourceMap for publishable packages
- Module Federation host build failing due to remote error
- Failed to run explicitly-set-projects-to-update-buildable-deps from @nx/js. This workspace is NOT up to date!
- Using the library generated by @monodon/rust napi in the same project HOT 2
- nx 19.2.2 cannot build repo setup for incremental builds
- Nx not able to migrate older Angular repository (9.XX -> 10.XX) HOT 2
- Serving apps cause npm:react-is error and restart HOT 3
- Js release-version: topological ordering iterates all edges per node instead of only its own
- `nx release`: fails when executed outside the workspace root directory 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 nx.