-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix(core): use lockfile when copying native files to prevent ERR_DLOPEN_FAILED #33021
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
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
View your CI Pipeline Execution ↗ for commit 29491ef
☁️ Nx Cloud last updated this comment at |
|
Failed to publish a PR release of this pull request, triggered by @MaxKless. |
3169356 to
29491ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nx Cloud is proposing a fix for your failed CI:
These changes fix a critical error where the vite plugin attempted to access properties on an undefined variable. We've resolved the scope issue by moving projectRootFromWorkspaceRoot from module-level to local scope within configResolved, and corrected the getTsConfig function to use the absolute projectRoot path directly rather than a relative path that needed rejoining with workspace root.
We could not verify this fix.
Suggested Fix changes
diff --git a/packages/vite/plugins/nx-tsconfig-paths.plugin.ts b/packages/vite/plugins/nx-tsconfig-paths.plugin.ts
index 4bb8e3e83e..415d0f3f8f 100644
--- a/packages/vite/plugins/nx-tsconfig-paths.plugin.ts
+++ b/packages/vite/plugins/nx-tsconfig-paths.plugin.ts
@@ -72,7 +72,6 @@ export function nxViteTsPaths(options: nxViteTsPathsOptions = {}) {
options.mainFields ??= [['exports', '.', 'import'], 'module', 'main'];
options.buildLibsFromSource ??= true;
let projectRoot = '';
- let projectRootFromWorkspaceRoot: string;
return {
name: 'nx-vite-ts-paths',
@@ -81,7 +80,7 @@ export function nxViteTsPaths(options: nxViteTsPathsOptions = {}) {
enforce: 'pre',
async configResolved(config: any) {
projectRoot = config.root;
- projectRootFromWorkspaceRoot = relative(workspaceRoot, projectRoot);
+ const projectRootFromWorkspaceRoot = relative(workspaceRoot, projectRoot);
foundTsConfigPath = getTsConfig(
process.env.NX_TSCONFIG_PATH ??
join(
@@ -217,14 +216,10 @@ export function nxViteTsPaths(options: nxViteTsPathsOptions = {}) {
} as Plugin;
function getTsConfig(preferredTsConfigPath: string): string {
- const projectTsConfigPath = getProjectTsConfigPath(
- projectRootFromWorkspaceRoot
- );
+ const projectTsConfigPath = getProjectTsConfigPath(projectRoot);
return [
resolve(preferredTsConfigPath),
- projectTsConfigPath
- ? resolve(join(workspaceRoot, projectTsConfigPath))
- : null,
+ projectTsConfigPath ? resolve(projectTsConfigPath) : null,
resolve(join(workspaceRoot, 'tsconfig.base.json')),
resolve(join(workspaceRoot, 'tsconfig.json')),
resolve(join(workspaceRoot, 'jsconfig.json')),
Or Apply changes locally with:
npx nx-cloud apply-locally YxZJ-yAkb
Apply fix locally with your editor ↗ View interactive diff ↗
🎓 To learn more about Self Healing CI, please visit nx.dev
|
Failed to publish a PR release of this pull request, triggered by @MaxKless. |
🐳 We have a release for that!This PR has a release associated with it. You can try it out using this command: npx [email protected] my-workspaceOr just copy this version and use it in your own command: 0.0.0-pr-33021-29491ef
To request a new release for this pull request, mention someone from the Nx team or the |
Current Behavior
Expected Behavior
Related Issue(s)
Fixes #