Conversation
✅ Deploy Preview for nx-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
View your CI Pipeline Execution ↗ for commit 8d5cfe1
☁️ Nx Cloud last updated this comment at |
252402a to
36d85ee
Compare
90cba0b to
892a9e4
Compare
d3adf25 to
dfe5911
Compare
2692b99 to
6b12d85
Compare
The default @nx/next:build for nx-dev outputs to dist/nx-dev/nx-dev. At runtime, Node.js can't resolve the ai package from that path because node_modules is at the workspace root, causing ERR_MODULE_NOT_FOUND on /ai-chat. Additionally, ui-video-courses is missing @nx/nx-dev-ui-icons as a dependency. Build in-place so .next stays close to node_modules and package resolution works. Clean up and simplify nx-dev targets. Fix missing dependency in ui-video-courses. Fixes DOC-418
The default @nx/next:build for nx-dev outputs to dist/nx-dev/nx-dev. At runtime, Node.js can't resolve the ai package from that path because node_modules is at the workspace root, causing ERR_MODULE_NOT_FOUND on /ai-chat. Additionally, ui-video-courses is missing @nx/nx-dev-ui-icons as a dependency. Build in-place so .next stays close to node_modules and package resolution works. Clean up and simplify nx-dev targets. Fix missing dependency in ui-video-courses. Fixes DOC-418 [Self-Healing CI Rerun]
There was a problem hiding this comment.
✅ The fix from Nx Cloud was applied
We updated the check-links target's dependsOn from nx-dev:next:build to nx-dev:sitemap to fix the missing sitemap error. The PR's refactor removed the old build target that previously triggered sitemap generation, leaving check-links with a dependency that doesn't produce the required sitemap.xml. This change restores the correct execution order: Next.js build → sitemap generation → link checking.
Tip
✅ We verified this fix by re-running nx-dev:check-links, astro-docs:e2e-ci--e2e/devkit-urls-fragments.spec.ts.
Suggested Fix changes
diff --git a/nx-dev/nx-dev/project.json b/nx-dev/nx-dev/project.json
index bc98029aa7..db158df888 100644
--- a/nx-dev/nx-dev/project.json
+++ b/nx-dev/nx-dev/project.json
@@ -84,8 +84,11 @@
},
"check-links": {
"cache": true,
- "dependsOn": ["nx-dev:next:build", "astro-docs:build"],
- "command": "ts-node -P ./scripts/tsconfig.scripts.json ./scripts/documentation/internal-link-checker.ts",
+ "dependsOn": ["nx-dev:sitemap", "astro-docs:build"],
+ "executor": "nx:run-commands",
+ "options": {
+ "command": "ts-node -P ./scripts/tsconfig.scripts.json ./scripts/documentation/internal-link-checker.ts"
+ },
"inputs": [
"{workspaceRoot}/docs/**/*",
{ "dependentTasksOutputFiles": "**/sitemap*.xml" },
🔔 Heads up, your workspace has pending recommendations ↗ to auto-apply fixes for similar failures.
View interactive diff ↗🎓 Learn more about Self-Healing CI on nx.dev
Co-authored-by: jaysoo <jaysoo@users.noreply.github.com>
## Current Behavior The default `@nx/next:build` for nx-dev outputs to `dist/nx-dev/nx-dev`. At runtime, Node.js can't resolve the `ai` package from that path because `node_modules` is at the workspace root — causing `ERR_MODULE_NOT_FOUND` on `/ai-chat`. Additionally, `ui-video-courses` is missing `@nx/nx-dev-ui-icons` as a dependency (introduced by #34669), causing a webpack compilation failure. ## Expected Behavior Build in-place to `nx-dev/nx-dev` (matching the existing Netlify config) so `.next` stays close to `node_modules` and package resolution works. This also simplifies config by removing the Netlify vs Vercel branching in sitemap scripts and project.json configurations. ## Other Notes This PR also: - Redirects `/` to `/blog` since almost everything else, including homepage, are in Framer. - Uses `@nx/next/plugin` to infer targets now so we no longer use any `@nx/next:*` executors. - Cleans up `nx-dev` project config so it no longer has `serve-docs` and other weird setup. It is purely just `nx dev nx-dev` or `nx build nx-dev` or `nx start nx-dev` like a normal Next.js app. - Removes extra `NETLIFY` env var checks to point outputs in different places. ## Related Issue(s) Closes DOC-418 --------- Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com> Co-authored-by: jaysoo <jaysoo@users.noreply.github.com>
## Current Behavior The default `@nx/next:build` for nx-dev outputs to `dist/nx-dev/nx-dev`. At runtime, Node.js can't resolve the `ai` package from that path because `node_modules` is at the workspace root — causing `ERR_MODULE_NOT_FOUND` on `/ai-chat`. Additionally, `ui-video-courses` is missing `@nx/nx-dev-ui-icons` as a dependency (introduced by #34669), causing a webpack compilation failure. ## Expected Behavior Build in-place to `nx-dev/nx-dev` (matching the existing Netlify config) so `.next` stays close to `node_modules` and package resolution works. This also simplifies config by removing the Netlify vs Vercel branching in sitemap scripts and project.json configurations. ## Other Notes This PR also: - Redirects `/` to `/blog` since almost everything else, including homepage, are in Framer. - Uses `@nx/next/plugin` to infer targets now so we no longer use any `@nx/next:*` executors. - Cleans up `nx-dev` project config so it no longer has `serve-docs` and other weird setup. It is purely just `nx dev nx-dev` or `nx build nx-dev` or `nx start nx-dev` like a normal Next.js app. - Removes extra `NETLIFY` env var checks to point outputs in different places. ## Related Issue(s) Closes DOC-418 --------- Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com> Co-authored-by: jaysoo <jaysoo@users.noreply.github.com>
Current Behavior
The default
@nx/next:buildfor nx-dev outputs todist/nx-dev/nx-dev. At runtime, Node.js can't resolve theaipackage from that path becausenode_modulesis at the workspace root — causingERR_MODULE_NOT_FOUNDon/ai-chat.Additionally,
ui-video-coursesis missing@nx/nx-dev-ui-iconsas a dependency (introduced by #34669), causing a webpack compilation failure.Expected Behavior
Build in-place to
nx-dev/nx-dev(matching the existing Netlify config) so.nextstays close tonode_modulesand package resolution works. This also simplifies config by removing the Netlify vs Vercel branching in sitemap scripts and project.json configurations.Other Notes
This PR also:
/to/blogsince almost everything else, including homepage, are in Framer.@nx/next/pluginto infer targets now so we no longer use any@nx/next:*executors.nx-devproject config so it no longer hasserve-docsand other weird setup. It is purely justnx dev nx-devornx build nx-devornx start nx-devlike a normal Next.js app.NETLIFYenv var checks to point outputs in different places.Related Issue(s)
Closes DOC-418