-
-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: > NX Cannot update Project header at packages/header. It doesn't exist or uses package.json configuration. #634
Comments
Verbose error: Cannot update Project header at packages/header. It doesn't exist or uses package.json configuration. |
@herrlegno could you provide the output of |
|
@edbzn is there a way to migrate from package.json to project.json that seems to be the way to be able to use this versioning plugin? |
@edbzn I found a workaround to make it work. Just add a project.json file with: {
"name": <project name>,
"targets":{}
} before running ng g @jscutlery/semver:install It will add the nx runners to it, and if you run: nx affected --target version [...options] after the commits it will run as expected. For reference after doing what I described in one of my packages I this project.json: {
"name": "eslint-config",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"targets": {
"version": {
"executor": "@jscutlery/semver:version",
"options": {
"preset": "conventional"
}
}
}
} |
@edbzn Today I wanted to update a package but it's not working again: It doesn't detect the changes |
@herrlegno does it work when using run-many command? nx run-many --target version |
Yeah, you have to explicitly give --parallel=1 for the concurrent Git access, anyway run-many is not what you need. I checked and it seems that actually, our executor is not compatible with package.json based projects. This is something we need to consider in #655, but for now, you need to use a project.json file to be able to configure executors. |
@edbzn sorry for bothering you again. I found out the problem that i mentioned was because i was running affected version with main as base branch and the commits were on main so there was no change. After changing the base branch to origin/main it runs perfectly. Running this (in my example) works as expected: nx affected --target version --base=origin/main --parallel=1 Sorry for all the trouble, first time using Nx + Automatic versioning. |
No problem! Happy it works for you. |
Hi Team,
I have upgraded my monorepo from Lerna (v3) to Nx (v15) and I m using workspaces config in package.json for dependency installation instead of lerna bootstrap and the Node Env is v16.5 However, I am getting below error when running
nx g @jscutlery/semver:install
package.json config:
"workspaces": [
"packages/**"
]
Selected Options:
✔ Lock/sync versions between packages? (y/N) · false
✔ Enforce conventional commits? (Y/n) · true
? Which projects would you like to version independently? Selected Header project
And, the error is:
The text was updated successfully, but these errors were encountered: