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
Blitz deploy fails on Render.com #785
Comments
Thanks for the report! I assume you do have react testing library installed? |
@merelinguist I haven't done anything after running |
If you need more info, here is the complete code: https://github.com/SigurdMW/din-advent |
Hmm you shouldn’t have to install anything then. This is a long shot, but can you try replacing |
Yeah @merelinguist suggestion should fix it. We are adding that to new apps by default in blitz-js/blitz#924 |
Unfortunately, it does not fix this. Still same error after doing you suggested changes in commit: Aug 25 08:59:33 PM warn - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use them at your own risk. |
Oh, they had an option to clear build cache and try again. Trying that now. EDIT: same error after clear build cache |
@SigurdMW hmm, can you try moving all your |
Ok nice, that did seem to work @flybayer. The site seems to be running fine now. |
Ok cool. If you have time, could you isolate which devDependency(s) need to be in the production deps? Probably it's just the testing-library dependency. I see options:
|
I think the 2nd option is the best, but I have not been able to figure it out. Should I create a PR for option blitz-js/blitz#1 or let someone else tackle it? |
Looks like this is a longstanding issue with Next. I think we should fix this at our compilation step so that no test files get copied to the actual Next.js build. Basically we add the following to this ignore list. "test/**/*",
"tests/**/*",
"spec/**/*",
"specs/**/*",
"**/*.test.*",
"**/*.spec.*", @ryardley what do you think about this? |
I agree let’s allow these to be ignored but I think it should not be ignored by default and be added to the docs as being configurable from blitz.config. What if you had a /pages/test/manage.tsx route? Also some folks like using other folder names. We can make the new generator create our default list. |
@ryardley ok cool. Having a way to add files to the ignore list would be good. I also think we should have the most common ignored by default. Unless I'm missing something, my suggestion would not affect
|
Update the default ignore path ref #942
What is the problem?
Blitz fails when deploying to Render.com with the following
render.yaml
file:Steps to Reproduce
render.yaml
file as aboveVersions
happens both on version 0.18.0 and 0.17.1-canary.7
Other
==> Starting service with 'blitz start --production -H 0.0.0.0'
Aug 25 08:08:24 PM You are using alpha software - if you have any problems, please open an issue here:
Aug 25 08:08:24 PM https://github.com/blitz-js/blitz/issues/new/choose
Aug 25 08:08:24 PM
Aug 25 08:08:30 PM - Preparing for launch
Aug 25 08:08:42 PM ✔ Prepped for launch
Aug 25 08:08:45 PM warn - You have enabled experimental feature(s).
Aug 25 08:08:45 PM warn - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use them at your own risk.
Aug 25 08:08:45 PM
Aug 25 08:08:45 PM warn - No build cache found. Please configure build caching for faster rebuilds. Read more: https://err.sh/next.js/no-cache
Aug 25 08:08:45 PM info - Creating an optimized production build...
Aug 25 08:08:45 PM Attention: Next.js now collects completely anonymous telemetry regarding usage.
Aug 25 08:08:45 PM This information is used to shape Next.js' roadmap and prioritize features.
Aug 25 08:08:45 PM You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
Aug 25 08:08:45 PM https://nextjs.org/telemetry
Aug 25 08:08:45 PM
Aug 25 08:09:02 PM Failed to compile.
Aug 25 08:09:02 PM
Aug 25 08:09:02 PM ./test/utils.tsx:3:41
Aug 25 08:09:02 PM Type error: Cannot find module '@testing-library/react' or its corresponding type declarations.
Aug 25 08:09:02 PM
Aug 25 08:09:02 PM 1 | import React from "react"
Aug 25 08:09:02 PM 2 | import { RouterContext, BlitzRouter } from "blitz"
Aug 25 08:09:02 PM > 3 | import { render as defaultRender } from "@testing-library/react"
Aug 25 08:09:02 PM | ^
Aug 25 08:09:02 PM 4 | import { renderHook as defaultRenderHook } from "@testing-library/react-hooks"
Aug 25 08:09:02 PM 5 |
Aug 25 08:09:02 PM 6 | export * from "@testing-library/react"
Aug 25 08:09:02 PM 'next build' failed with status code: 1
The text was updated successfully, but these errors were encountered: