Comments (10)
Thanks for proving a link to reproduce. I receive another report about the blank page on vercel and it's a priority at the moment.
Will have a look and possibly push a fix later today.
PS: I'll try to sort out the "View code" but that's lower on the list right now. Still I think that's an easy fix.
from destack.
From what I see in the repo if you run the Destack locally it should show as blank too. Let me know if that's not the case to investigate further.
Yup, it is not the case, it is running well locally.
I'm curious if there's a bug that caused this and would be very helpful if we find a way to reproduce this.
Maybe this might help. We used this NextJS with-chakra-ui starter
Note: By default, Vercel sets NODE_ENV = production when you deploy a project to production. If it's changed or a different environment is used it might break Destack environment detection and if that happened there's a good chance it's the root of the problem. If you use a different environment on Vercel (other than production) you might want to set NODE_ENV = production manually.
I just did a double check of env variables in .env.local
and on Vercel deployment env. There is no overwrite or modification to the NODE_ENV variable. Oh, and we only have one deployment live at anytime and that is production.
from destack.
I think I understand what the issue is. Destack is normally used as an editor locally which shows the generated content in production.
If you guys are looking to have the editor in production that is totally possible with the server
prop. The Destack editor works like that. It's hosted on if you want to take a quick peek: destack-page and its source code is here: pages/index.js.
We might need to update the Readme.md
to better document this use case. Thanks for the heads up!
from destack.
Does it need to be the only page in pages? Meaning to say only one file in pages/index.js?
No, it doesn't matter how many pages you have or if Destack is located in pages/index.js
or another file. What ever suits you best should work.
How about the api route in step 2 of README.md? Not required to put the api route file in pages/api/builder/handle.js?
If you are just using the editor you don't need step 2. That is for saving the page locally (in a JSON file) and is not required if you are just using the editor in production.
from destack.
I just got the chance to look at your repo and the bug you submitted yesterday.
It seems your data/default.json file is just a blank page (it's a <section>
tag with no child elements).
From what I see in the repo if you run the Destack locally it should show as blank too. Let me know if that's not the case to investigate further.
I'm curious if there's a bug that caused this and would be very helpful if we find a way to reproduce this.
Note: By default Vercel sets NODE_ENV = production when you deploy a project to production. If it's changed or a different environment is used it might break Destack environment detection and if that happened there's a good chance it's the root of the problem. If you use a different environment on Vercel (other than production) you might want to set NODE_ENV = production manually.
from destack.
You are welcome @LiveDuo 😊
Hmm.. I really must be doing something wrong here. This is the new code after referencing to your code at page/index.js
// in pages/destack.js
import "grapesjs/dist/css/grapes.min.css";
import { ContentProvider } from "destack";
export default function Destack(props) {
return <ContentProvider {...props} server={false} />;
}
Still not showing up on the production page https://wild-bakes.com/destack
Does it need to be the only page in pages
? Meaning to say only one file in pages/index.js
?
How about the api route in step 2 of README.md
? Not required to put the api route file in pages/api/builder/handle.js
?
from destack.
Hey @OkkarMin,
I think I stumbled across the problem and pushed a fix a few days ago.
If you are still looking for a solution there's a little section on Readme.md#show-editor-in-production to help setting it up. I also updated the example editor we have that very close to what you need. Here's the exact file
pages/index.js.
Note: It might be subtle and easily missed but the server
prop has now changed to showEditorInProd
.
from destack.
Awesome! Working well now, just missing the 'view code' button. If I recall correctly, you will be adding that in near future 👍
Will be closing this issue
from destack.
@LiveDuo @OkkarMin Can any one please tell me how you loaded data into the editor in production?
from destack.
@LiveDuo @OkkarMin Can any one please tell me how you loaded data into the editor in production?
Should work without any further setup ie. the page you see in development should appear in production (just without the editor).
from destack.
Related Issues (20)
- I want to create multi tenancy with page builder HOT 5
- How to deploy the project with editor HOT 2
- using destack as theming/theme builder for react/next site HOT 1
- Destack v3 - the road to simplicity
- How to Change Color of Components HOT 3
- RTL Support HOT 1
- Error when "next build" HOT 1
- Components are tough to edit HOT 6
- Editor selection font color issue HOT 1
- Drag and Drop multi slider in one page HOT 1
- Documentation HOT 1
- Unhandled Runtime Error HOT 1
- NextJS app router compatibility HOT 4
- path undefined error HOT 2
- Tailwind .text-transparent HOT 1
- Enable custom HTML markup HOT 2
- Vue3 support HOT 3
- Nextjs build can't show the page HOT 12
- Editor standalone use HOT 2
- Destack Not working for latest Next.js HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from destack.