Skip to content

Comments

fix: correctly find site root when using SSR with Nx#1281

Merged
kodiakhq[bot] merged 2 commits intomainfrom
rs/nx-dist-dir
Mar 24, 2022
Merged

fix: correctly find site root when using SSR with Nx#1281
kodiakhq[bot] merged 2 commits intomainfrom
rs/nx-dist-dir

Conversation

@orinokai
Copy link
Contributor

Summary

The handler currently changes the working directory to the site root, however if the site uses Nx the site root is moved within a 'dist' folder and SSR routes consequently fail.

Test plan

  1. Visit the Deploy Preview and check the /api route returns 'Hello World' json output

Relevant links (GitHub issues, Notion docs, etc.) or a picture of cute animal

Fixes #1278

Standard checks:

  • Check the Deploy Preview's Demo site for your PR's functionality
  • Add docs when necessary

🧪 Once merged, make sure to update the version if needed and that it was published correctly.

@orinokai orinokai requested a review from ascorbic March 24, 2022 12:37
@orinokai orinokai self-assigned this Mar 24, 2022
@netlify
Copy link

netlify bot commented Mar 24, 2022

Deploy Preview for netlify-plugin-nextjs-demo ready!

Name Link
🔨 Latest commit 4b94bc4
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/623c6612120c1300082ec08d
😎 Deploy Preview https://deploy-preview-1281--netlify-plugin-nextjs-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@orinokai orinokai changed the title Rs/nx dist dir fix: Nx site root issue Mar 24, 2022
@github-actions github-actions bot added the type: bug code to address defects in shipped code label Mar 24, 2022
@netlify
Copy link

netlify bot commented Mar 24, 2022

Deploy Preview for netlify-plugin-nextjs-nx-monorepo-demo ready!

Name Link
🔨 Latest commit 4b94bc4
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-nx-monorepo-demo/deploys/623c6612807d7e0009a23415
😎 Deploy Preview https://deploy-preview-1281--netlify-plugin-nextjs-nx-monorepo-demo.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Mar 24, 2022

Deploy Preview for netlify-plugin-nextjs-export-demo ready!

Name Link
🔨 Latest commit 4b94bc4
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-export-demo/deploys/623c66121a57760008a21fb5
😎 Deploy Preview https://deploy-preview-1281--netlify-plugin-nextjs-export-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Mar 24, 2022

Deploy Preview for netlify-plugin-nextjs-static-root-demo ready!

Name Link
🔨 Latest commit 4b94bc4
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-static-root-demo/deploys/623c66127596b00008d0d8bb
😎 Deploy Preview https://deploy-preview-1281--netlify-plugin-nextjs-static-root-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@cypress
Copy link

cypress bot commented Mar 24, 2022



Test summary

22 0 0 0


Run details

Project netlify-plugin-nextjs-default-demo
Status Passed
Commit 8be43a6 ℹ️
Started Mar 24, 2022 12:41 PM
Ended Mar 24, 2022 12:42 PM
Duration 01:29 💡
OS Linux Ubuntu - 20.04
Browser Chrome 98

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@cypress
Copy link

cypress bot commented Mar 24, 2022



Test summary

7 0 0 0


Run details

Project netlify-plugin-nextjs-static-demo
Status Passed
Commit 8be43a6 ℹ️
Started Mar 24, 2022 12:43 PM
Ended Mar 24, 2022 12:44 PM
Duration 01:16 💡
OS Linux Ubuntu - 20.04
Browser Chrome 98

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@cypress
Copy link

cypress bot commented Mar 24, 2022



Test summary

2 0 0 0


Run details

Project netlify-plugin-nextjs-nx-monorepo-demo
Status Passed
Commit 8be43a6 ℹ️
Started Mar 24, 2022 12:43 PM
Ended Mar 24, 2022 12:44 PM
Duration 01:10 💡
OS Linux Ubuntu - 20.04
Browser Chrome 98

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@ascorbic ascorbic changed the title fix: Nx site root issue fix: correctly find site root when using SSR with Nx Mar 24, 2022
Copy link
Contributor

@ascorbic ascorbic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@kodiakhq kodiakhq bot merged commit 3b26573 into main Mar 24, 2022
@kodiakhq kodiakhq bot deleted the rs/nx-dist-dir branch March 24, 2022 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge type: bug code to address defects in shipped code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ___netlify-handler fails with boilerplate NX Mono Repo

2 participants