-
Notifications
You must be signed in to change notification settings - Fork 839
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
Can't build and deploy with Next.js #6531
Comments
Work for #6531: do not render icons if document is not defined
Hello i face the same problem: I'm using
The build is failing when i have dropdown like this.
|
@anburocky3 You can check our react next template. Thank you, |
@kaloyaqn @anburocky3 I don't know if you still face the issue, but I think it's caused by the fact thatsome part of the component (don't sure what) is still computed on the server. "use client";
function OrderForm({ products }: { products: Product[] }) {
const [loaded, setLoaded] = useState(false);
useEffect(() => {
setLoaded(true);
}, []);
const survey = new Model(jsonModel);
// This is to force surveyjs to be fully client
return loaded ? <Survey model={survey} /> : <></>;
}
export default OrderForm; |
Hello,
I'm trying to embed a survey.js quiz into my Next.js application. Seems to be working on localhost, but when I try to build it or deploy it it shows a TypeError: Cannot read properties of undefined (reading 'root);
This is the full console:
I've provided you with my code also. I would appreciate it if you help me!
Are you requesting a feature, reporting a bug or asking a question?
bug
What is the current behavior?
It doesn't work
What is the expected behavior?
To work
How would you reproduce the current behavior (if this is a bug)?
I don't know
Provide the test code and the tested page URL (if applicable)
Can't because It wont let me build
Tested page URL:
Test code
Specify your
The text was updated successfully, but these errors were encountered: