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

next export - Not working #516

Closed
BenedictWHD opened this issue Feb 27, 2021 · 5 comments · Fixed by blitz-js/blitz#2039
Closed

next export - Not working #516

BenedictWHD opened this issue Feb 27, 2021 · 5 comments · Fixed by blitz-js/blitz#2039

Comments

@BenedictWHD
Copy link

What is the problem?

Next export which would be required to deploy on some providers does not work out of the box due to use of next/image component within Blitz.

When doing next export after a blitz build, we get the following error, even though personally not making use of either the Blitz Image component or the Next Image component with the application.

Error: Image Optimization using Next.js' default loader is not compatible with next export.
Possible solutions:
- Use next start, which starts the Image Optimization API.
- Use Vercel to deploy, which supports Image Optimization.
- Configure a third-party loader in next.config.js.
Read more: https://err.sh/next.js/export-image-api

What are detailed steps to reproduce this?

1.Create a fresh Blitz application.
2. add next export to "build" in package.json ("build": "blitz build && next export").
3. npm run build in console.

Run blitz -v and paste the output here:

You are using beta software - if you have any problems, please open an issue here:
https://github.com/blitz-js/blitz/issues/new/choose

Windows 10 | win32-x64 | Node: v14.15.4

blitz: 0.30.5 (global)
blitz: 0.30.5 (local)

Package manager: npm
System:
OS: Windows 10 10.0.19041
CPU: (8) x64 Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
Memory: 18.57 GB / 31.94 GB
Binaries:
Node: 14.15.4 - D:\Code\Node\node.EXE
Yarn: Not Found
npm: 7.6.0 - D:\Code\Node\npm.CMD
Watchman: Not Found
npmPackages:
@prisma/client: ~2.17 => 2.17.0
blitz: 0.30.5 => 0.30.5
prisma: ~2.17 => 2.17.0
react: 0.0.0-experimental-3310209d0 => 0.0.0-experimental-3310209d0
react-dom: 0.0.0-experimental-3310209d0 => 0.0.0-experimental-3310209d0
typescript: 4.2.2 => 4.2.2

@flybayer
Copy link
Member

Hey @BenedictWHD, I'm curious, why are you using Blitz instead of Next.js for this?

@BenedictWHD
Copy link
Author

Hey @BenedictWHD, I'm curious, why are you using Blitz instead of Next.js for this?

Hi @flybayer,

Thanks for taking a look, is essentially as Blitz has extra features that I would like to make use of which next doesn't, specifically for me, the ability to schedule functions to run is very useful!

@JuanM04
Copy link
Contributor

JuanM04 commented Feb 28, 2021

the ability to schedule functions to run is very useful

Have you tried Quirrel for Next.js?

@BenedictWHD
Copy link
Author

the ability to schedule functions to run is very useful

Have you tried Quirrel for Next.js?

Hi! Yes thanks, as this is what Blitz uses, though a good shout! I may use it independently of Blitz in the meantime until this is resolved as I do want to be able to make use of the other features of Blitz with the scheduled functions eventually.

@flybayer
Copy link
Member

flybayer commented Mar 1, 2021

Ok yeah makes sense. This will be fixed by #928 which I'm working on soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment