Comments (2)
hi @elevenpassin thanks for trying this out.
defaultProject
is not required.
why did you add it?
removing it makes some commands throw which is something that needs to be looked at on its own right.
having it there masks the issue of the missing project and it proved a stealthy issue for us.
I did some further tests because before reporting I tried this in 3 different environments:
- work - windows
- work - CI linux
- home - windows
in all cases I could not get to run the required project.
I realized that you might be using a different terminal app.
So I tried more things...
Windows at home - windows terminal - powershell does not work
Windows at home - cmd - works
Windows at work- windows terminal - powershell does not work
Windows at work - cmd - does not work
Linux CI - Jenkins - does not work
EDIT: in CI the workspace is created from scratch - no previous caching is at play
I also reinstalled everything - made sure global and repo Nx versions match - stopped daemon and nx reset.
Can you give another try with windows terminal/powershell?
Thanks in advance...
from nx.
I tried to test this locally, but I was unfortunately not able to replicate this locally. As you can see from below logs, I was able to get the correct project running by using the --project
option. I did add the defaultProject too here to nx graph
my-app
D:\Development\github\nx-exp\nx-incremental-bug on λ npm run start -- --project=my-app
> @nx19/[email protected] start
> nx serve --project=my-app
> nx run my-app:serve:development
- Generating browser application bundles (phase: setup)...
✔ Browser application bundle generation complete.
Initial chunk files | Names | Raw size
vendor.js | vendor | 2.85 MB |
polyfills.js | polyfills | 345.88 kB |
styles.css, styles.js | styles | 233.53 kB |
main.js | main | 47.19 kB |
runtime.js | runtime | 6.67 kB |
| Initial total | 3.49 MB
Build at: 2024-06-13T20:02:37.611Z - Hash: b0f3c2a24dd91650 - Time: 21630ms
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
√ Compiled successfully.
my-app-m
D:\Development\github\nx-exp\nx-incremental-bug on λ npm run start -- --project=my-app-m
> @nx19/[email protected] start
> nx serve --project=my-app-m
> nx run my-app-m:serve:development
- Generating browser application bundles (phase: setup)...
NX Running target build for project my-lib:
- my-lib
> nx run my-lib:build:production
Building Angular Package
------------------------------------------------------------------------------
Building entry point '@nx19/my-lib'
------------------------------------------------------------------------------
- Compiling with Angular sources in Ivy full compilation mode.
✔ Compiling with Angular sources in Ivy full compilation mode.
Copying assets
Writing package manifest
Built @nx19/my-lib
------------------------------------------------------------------------------
Built Angular Package
- from: D:\Development\github\nx-exp\nx-incremental-bug\libs\my-lib
- to: D:\Development\github\nx-exp\nx-incremental-bug\dist\libs\my-lib
------------------------------------------------------------------------------
Build at: 2024-06-13T20:14:31.930Z - Time: 1498ms
NX Successfully ran target build for project my-lib
✔ Browser application bundle generation complete.
Initial chunk files | Names | Raw size
vendor.js | vendor | 2.85 MB |
polyfills.js | polyfills | 345.88 kB |
styles.css, styles.js | styles | 233.55 kB |
main.js | main | 52.25 kB |
runtime.js | runtime | 6.67 kB |
| Initial total | 3.49 MB
Build at: 2024-06-13T20:14:39.033Z - Hash: 1a9c089bf2e8c00b - Time: 10213ms
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
√ Compiled successfully.
✔ Browser application bundle generation complete.
Initial chunk files | Names | Raw size
main.js | main | 52.25 kB |
runtime.js | runtime | 6.67 kB |
3 unchanged chunks
Build at: 2024-06-13T20:14:39.426Z - Hash: 6b6b10dffdbc54cc - Time: 245ms
√ Compiled successfully.
It could definitely just be me but here's the steps I did:
- Clone the example repo
- Install, modify
nx.json
to have"defaultProject": "my-app"
- Try to run the above commands.
- I did try to stop the daemon and clear cache etc and try again and it's the same result.
from nx.
Related Issues (20)
- Nx affected exits with 0 when base ref does not exist
- Project Crystal: AggregateCreateNodesError with version 19.3.0 HOT 2
- Upgrade to Nx 19.1.0-19.3.0 fails on `migration-v18 from @angular/cdk`
- `Updated <lib> to null` when the changelog is generated with `nx release`
- Failed to parse bun lockfile HOT 1
- MultipleProjectsWithSameNameError when `.git` folder is missing but gitignored `dist` contains `project.json` HOT 1
- Nx Cloud Deployment Hangs on Subsequent Attempts with Error in Copying Dependency afterwards HOT 2
- Nx library + Next + Material UI component selectors breaks build
- @nx/expo executor `sync-deps` add more dependencies than necessary HOT 2
- `expo-build-properties` doesn't set up Gradle properties and iOS doesn't build the app
- #21428 removed `devDependencies` from package.json HOT 3
- Vite Config TypeError on `defineConfig` regarding `cacheDir` with test config
- Shared buildable library code is included in each remote app bundle HOT 1
- `affected` command documentation references a removed command
- One package in my workspace doesn't have the usual implicit dependency on the `default` named input
- Lint check is broken after using @nx/eslint:convert-to-flat-config HOT 1
- `nx release`: internal `getLatestGitTagForPattern` behaviour breaking change / not aligned with `currentVersionResolver` config
- nx-cloud complete-ci-run doesn't close agents
- NX release is not correctly bumping dependant projects when using conventional commits HOT 1
- Function runTaskInForkedProcess hides error from user
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.