Comments (1)
We are facing the same issue since version 18.0.0, now on 18.0.7 and still an issue. The use of Nx is completely broken, since the repo cannot be resolved at all. Even simple tasks such as running nx report
don't work.
It seems that most if not all our apps cause an issue with an error like
NX Unable to merge project information for "apps/api-alerts-scheduler" from apps/api-alerts-scheduler/project.json using plugin nx/core/project-json.
Inner Error: TypeError: Cannot read properties of undefined (reading 'join')
at isCompatibleTarget (/Users/alexistrepanier/dev/assek/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]/node_modules/nx/src/project-graph/utils/project-configuration-utils.js:355:67)
at mergeTargetConfigurations (/Users/alexistrepanier/dev/assek/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]/node_modules/nx/src/project-graph/utils/project-configuration-utils.js:294:26)
at mergeProjectConfigurationIntoRootMap (/Users/alexistrepanier/dev/assek/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]/node_modules/nx/src/project-graph/utils/project-configuration-utils.js:111:34)
at /Users/alexistrepanier/dev/assek/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]/node_modules/nx/src/project-graph/utils/project-configuration-utils.js:204:21
at async createProjectConfigurations (/Users/alexistrepanier/dev/assek/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]/node_modules/nx/src/project-graph/utils/retrieve-workspace-files.js:89:62)
at async buildProjectGraphAndSourceMapsWithoutDaemon (/Users/alexistrepanier/dev/assek/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]/node_modules/nx/src/project-graph/project-graph.js:71:69)
at async createProjectGraphAndSourceMapsAsync (/Users/alexistrepanier/dev/assek/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]/node_modules/nx/src/project-graph/project-graph.js:136:25)
at async createProjectGraphAsync (/Users/alexistrepanier/dev/assek/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]/node_modules/nx/src/project-graph/project-graph.js:125:39)
at async Object.affected (/Users/alexistrepanier/dev/assek/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]/node_modules/nx/src/command-line/affected/affected.js:33:26)
Here is the project configuration for the project referenced in the error:
{
"name": "api-alerts-scheduler",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/api-alerts-scheduler/src",
"projectType": "application",
"targets": {
"build": {
"executor": "@nx/webpack:webpack",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": {
"outputPath": "dist/apps/api-alerts-scheduler",
"main": "apps/api-alerts-scheduler/src/main.ts",
"tsConfig": "apps/api-alerts-scheduler/tsconfig.app.json",
"assets": ["apps/api-alerts-scheduler/src/assets"],
"generatePackageJson": true,
"target": "node",
"compiler": "tsc",
"webpackConfig": "apps/api-alerts-scheduler/webpack.config.js"
},
"configurations": {
"production": {
"optimization": true,
"extractLicenses": true,
"inspect": false
},
"development": {
"optimization": true,
"extractLicenses": true,
"inspect": false
}
}
},
"serve": {
"executor": "@nx/js:node",
"defaultConfiguration": "development",
"options": {
"buildTarget": "api-alerts-scheduler:build"
},
"configurations": {
"production": {
"buildTarget": "api-alerts-scheduler:build:production"
},
"development": {
"buildTarget": "api-alerts-scheduler:build:development"
}
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"]
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/apps/api-alerts-scheduler"],
"options": {
"jestConfig": "apps/api-alerts-scheduler/jest.config.ts"
}
},
"deploy": {
"executor": "nx:run-commands",
"options": {},
"configurations": {
"production": {
"command": "bash ./infra/terraform/web-api/deploy-web-api.sh prod alerts-scheduler"
},
"development": {
"command": "bash ./infra/terraform/web-api/deploy-web-api.sh dev alerts-scheduler"
}
},
"inputs": [
"deploy-default",
"^production",
"{workspaceRoot}/infra/terraform/web-api/**/*",
"{workspaceRoot}/infra/terraform/common/**/*"
],
"defaultConfiguration": "development"
}
},
"tags": []
}
It does look like the issue is coming from the nx:run-commands
executor. If I remove our custom target, the error seems to go away, but then the next app with the nx:run-commands
fails.
from nx.
Related Issues (20)
- Nx should help provide some debug configs or a guide for VSCode HOT 1
- Install nx failed with v18.1.0 HOT 4
- Integrated monorepo tutorial not accurate
- Nx trying to access local files on mac
- @nx/web:file-server is a wrapper around http-server, let us pass any arg it accepts
- `@nx/vite:test` ignoring `passWithNoTests` after migrating to 18.1.0 HOT 4
- Directory not empty (os error 66
- @nx/cypress is dependency of @nx/angular
- multiple issues with a brand new nest with angular project HOT 1
- Issue using @swc-node/register and @swc/core
- Images are missing on "How Caching Works" page
- K8s - Nx - Next HOT 6
- `nx release` incorrectly derives next prerelease version based on conventional commits HOT 10
- jest throws Unknown option "reporters" with value ... HOT 1
- Nx affected requiers plugins mentions in "Plugins" field in nx.json HOT 2
- NX 18: Vite config and plugins are called twice when a custom target is defined HOT 2
- Azure Devops with NX Agents does not work HOT 5
- 'The "path" argument must be of type string or...' if using @nx/js:swc and @nx/webpack:webpack (with generatePackageJson)
- NX isn't restoring `output` defined folder for `test` target HOT 1
- Incorrect result after run task using dependsOn
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.