Skip to content

Fix validation of sites without Next.js #117

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

Closed
ehmicky opened this issue Mar 11, 2021 · 3 comments · Fixed by #124
Closed

Fix validation of sites without Next.js #117

ehmicky opened this issue Mar 11, 2021 · 3 comments · Fixed by #124
Assignees
Labels
type: bug code to address defects in shipped code

Comments

@ehmicky
Copy link

ehmicky commented Mar 11, 2021

When a site does not have Next.js, the following error message should be shown, so it is clear to users what should be fixed:

https://github.com/netlify/netlify-plugin-nextjs/blob/430569c6421f4447228ada44fe5821707f796d98/helpers/validateNextUsage.js#L9-L13

This requires importing next dynamically. This used to rely on next-on-netlify being dynamically imported. With next-on-netlify being merged, this stopped working and the following is shown instead (marked as a plugin bug in the build logs):

wrong_next

This should be fixed by importing next dynamically.

@ehmicky ehmicky added the type: bug code to address defects in shipped code label Mar 11, 2021
@ehmicky ehmicky self-assigned this Mar 11, 2021
@ehmicky
Copy link
Author

ehmicky commented Mar 11, 2021

Also, if a site is using static exports (and does not have next), it will now fail.

@ehmicky
Copy link
Author

ehmicky commented Mar 11, 2021

Partially done at #123

@ehmicky
Copy link
Author

ehmicky commented Mar 11, 2021

Fixed by #124.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant