-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Application build failing after upgrade to 15.4.2 #14106
Comments
This bug seems to be related to versions |
I've got the same issue and after debugging this is what I've found: The issue is only present in my existing NX monorepo with a ton of other npm dependencies, but with a clean NX repo it works fine. Both use Yarn. After logging problematic line https://github.com/nrwl/nx/blob/master/packages/nx/src/lock-file/yarn.ts#L307-L309, the one that is failing is missing Failing example: {
"[email protected]": {
"version": "4.9.4",
"resolution": "typescript@npm:4.9.4",
"bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" },
"checksum": "e782fb9e0031cb258a80000f6c13530288c6d63f1177ed43f770533fdc15740d271554cdae86701c1dd2c83b082cea808b07e97fd68b38a172a83dbf9e0d0ef9",
"languageName": "node",
"linkType": "hard",
"packageMeta": ["typescript@npm:2 - 4"]
},
"[email protected]": {
"version": "4.8.4",
"resolution": "typescript@npm:4.8.4",
"bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" },
"checksum": "3e4f061658e0c8f36c820802fa809e0fd812b85687a9a2f5430bc3d0368e37d1c9605c3ce9b39df9a05af2ece67b1d844f9f6ea8ff42819f13bcb80f85629af0",
"languageName": "node",
"linkType": "hard",
"packageMeta": ["typescript@npm:4.8.4"],
"rootVersion": true
}
}
{
"typescript@patch:[email protected]": {
"version": "npm%3A4.9.4#~builtin<compat/typescript>::version=4.9.4&hash=701156",
"resolution": "typescript@patch:typescript@npm%3A4.9.4#~builtin<compat/typescript>::version=4.9.4&hash=701156",
"bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" },
"checksum": "37f6e2c3c5e2aa5934b85b0fddbf32eeac8b1bacf3a5b51d01946936d03f5377fe86255d4e5a4ae628fd0cd553386355ad362c57f13b4635064400f3e8e05b9d",
"languageName": "node",
"linkType": "hard",
"actualVersion": "4.9.4",
"packageMeta": [
"typescript@patch:typescript@2 - 4#~builtin<compat/typescript>"
]
},
"typescript@patch:[email protected]": {
"version": "npm%3A4.8.4#~builtin<compat/typescript>::version=4.8.4&hash=701156",
"resolution": "typescript@patch:typescript@npm%3A4.8.4#~builtin<compat/typescript>::version=4.8.4&hash=701156",
"bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" },
"checksum": "301459fc3eb3b1a38fe91bf96d98eb55da88a9cb17b4ef80b4d105d620f4d547ba776cc27b44cc2ef58b66eda23fe0a74142feb5e79a6fb99f54fc018a696afa",
"languageName": "node",
"linkType": "hard",
"actualVersion": "4.8.4",
"packageMeta": [
"typescript@patch:[email protected]#~builtin<compat/typescript>",
"typescript@patch:typescript@npm%3A4.8.4#~builtin<compat/typescript>"
]
}
}
Working example {
"[email protected]": {
"version": "4.8.4",
"resolution": "typescript@npm:4.8.4",
"bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" },
"checksum": "3e4f061658e0c8f36c820802fa809e0fd812b85687a9a2f5430bc3d0368e37d1c9605c3ce9b39df9a05af2ece67b1d844f9f6ea8ff42819f13bcb80f85629af0",
"languageName": "node",
"linkType": "hard",
"packageMeta": ["typescript@npm:~4.8.2"],
"rootVersion": true
}
}
{
"typescript@patch:[email protected]": {
"version": "npm%3A4.8.4#~builtin<compat/typescript>::version=4.8.4&hash=701156",
"resolution": "typescript@patch:typescript@npm%3A4.8.4#~builtin<compat/typescript>::version=4.8.4&hash=701156",
"bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" },
"checksum": "301459fc3eb3b1a38fe91bf96d98eb55da88a9cb17b4ef80b4d105d620f4d547ba776cc27b44cc2ef58b66eda23fe0a74142feb5e79a6fb99f54fc018a696afa",
"languageName": "node",
"linkType": "hard",
"actualVersion": "4.8.4",
"packageMeta": [
"typescript@patch:typescript@~4.8.2#~builtin<compat/typescript>"
],
"rootVersion": true
}
} Typescript v4.9.4 was however added because it is a dependency of After removing The only working solution that is acceptable currently is by using yarn "resolutions": {
"@commitlint/load/typescript": "4.8.4"
} |
I also wanted to say that upgrading NX has been a slight nightmare lately, because after I found this bug I downgraded NX to v.15.3.3, but later developers on the Windows platform were complaining that it's not possible to start or build and app using a custom NX executor. The error from the output was: $ nx serve myApp
> NX Unable to resolve @myOrg/nx-vue:dev-server.
Unable to resolve local plugin with import path @myOrg/nx-vue So it was failing to reference a local plugin on Windows only. It looks like this was fixed in NX v15.4.0, but then the bug from this ticket appeared. |
Is someone willing to share their |
We'll disable the lockfile behavior, and do more testing around it. Should be in the next release. Sorry for the inconvenience. |
Merged and will be fixed in 14.4.5. |
@jaysoo This is still happening when yarn2+ is used. The problem seems to be that this function - nx/packages/nx/src/lock-file/utils/mapping.ts Lines 27 to 36 in c3bc517
checks for existence of a file that may not exist in yarn berry environments. This same function is used here - nx/packages/nx/src/lock-file/yarn.ts Lines 113 to 115 in c3bc517
which causes problems in yarn berry environments. |
I still have the same problem in 15.4.5. We're using pnpm, not yarn. |
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. |
Current Behavior
Both dynamic/static application build fail with error after upgrade from
15.0.13
to15.4.2
usingnx migrate latest
Expected Behavior
Both dynamic and static build should pass successfully
Github Repo
No response
Steps to Reproduce
Nx Report
Failure Logs
Additional Information
No response
The text was updated successfully, but these errors were encountered: