Skip to content
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

No pages or functions built with 3.4.0 #382

Closed
antho1404 opened this issue Jun 3, 2021 · 12 comments · Fixed by #385
Closed

No pages or functions built with 3.4.0 #382

antho1404 opened this issue Jun 3, 2021 · 12 comments · Fixed by #385
Labels
priority: high type: bug code to address defects in shipped code

Comments

@antho1404
Copy link

antho1404 commented Jun 3, 2021

Describe the bug

The build on Netlify doesn't produce any result anymore. Since the recently released 3.4.0, none of my HTML files nor functions are built and created in the out directory.
I am not 100% sure that this comes from the plugin, but it seems to work correctly with 3.3.1.

This happens on Netlify with deploy preview and in local with the netlify build command

Here is a log for this https://app.netlify.com/sites/emotional-nft-dapp/deploys/60b8b405f65f78000751f8a9

Expected behavior
Once built, the website should contain all the HTML files and the functions but this is not the case.

Versions

  • Next.js: 10.2.0
  • plugin (if installed at fixed version): Automatically retrieved with 3.4.0 (everything works correctly with the 3.3.1)
@antho1404
Copy link
Author

This is an issue introduced by #374.
The way to reproduce is to create a next project with no next.config.js.

I found a workaround by creating this file with the following config.

module.exports = {
  basePath: '',
}

@AymenBenAmor
Copy link

@antho1404 fixed it for me as well! Thanks a lot :)

@lindsaylevine lindsaylevine added priority: high type: bug code to address defects in shipped code labels Jun 3, 2021
@lindsaylevine
Copy link

lindsaylevine commented Jun 3, 2021

@antho1404 oh my goodness, thank you for reporting this! ftr you can always install the plugin at a fixed version (see faq) to get around a breaking release. i'm sorry you ran into it, though! i believed basePath defaulted to '' in the absence of a config (when we use next's loadConfig function, it defaults the config to a lot of values) but it seems for you all that actually isn't the case! i'll let you know when this is all taken care of 🙏

@lindsaylevine
Copy link

lindsaylevine commented Jun 3, 2021

@lindsaylevine
Copy link

ok i meant to circle back here ages ago but had some calls! right after i commented those, i rolled back so the default plugin version that is installed for next sites (>= next v10.0.6) is back to 3.3.1. we'll release a 3.4.1 soon that handles the case you reported and at that time i can circle back and close this issue. thanks again, appreciate the info and patience!! 🙏

@antho1404
Copy link
Author

Thank you for the answers and the FAQ link.

Feel free to ask me to test even on a dedicated branch (I can test locally with a local plugin) if my case is particular and you cannot reproduce.

@lindsaylevine
Copy link

lindsaylevine commented Jun 4, 2021

thanks @antho1404 ! i just opened a PR to fix this issue (#385) so if you wanted, you could try to npm install --save git://github.com/netlify/netlify-plugin-nextjs.git#ll/basePath-check! just make sure, if you happen to be testing in production, to clear cache and deploy site under the trigger deploy dropdown, as a previous install of the plugin will likely be cached.

@antho1404
Copy link
Author

Just tested and approved the PR to confirm that it works for my case now.

@lindsaylevine
Copy link

thanks @antho1404 !!!

@antho1404
Copy link
Author

It seems like it broke again with the 3.4.1.
It was working fine locally but somehow when installed with netlify the issue persists.

@lindsaylevine
Copy link

@antho1404 ok, i will try to reproduce myself. in the meantime, pls provide us with a repo that fails for you. i recommend next time you're testing a fix to please test it in all environments/methods that you intend to use!

@antho1404
Copy link
Author

I somehow made it work local but maybe because it used an existing cache or something like that. I'm not familiar with how netlify CLI works or how this plugin works in detail and couldn't deploy on a production website that I'm working on to test real conditions.

I just tried with a fresh new repo and can reproduce with the simple get started from nextjs

Here are the public logs of the build https://app.netlify.com/sites/gifted-gates-ad3944/deploys/60ba37e7d8fdef44139ab361
and the website with no pages available here https://gifted-gates-ad3944.netlify.app/

This is a basic application with no custom code and my other application is quite standard respecting the nextjs base app. It would be good to add this basic use case in automatic tests or at least before creating a release.

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

Successfully merging a pull request may close this issue.

3 participants