Closed kaloyaqn closed 1 year ago
Hello i face the same problem: I'm using "survey-react-ui": "^1.10.2",
λ npm run build
> personal-review@0.1.0 build
> next build
▲ Next.js 14.1.4
- Environments: .env.local
Creating an optimized production build ...
(node:33616) [DEP_WEBPACK_MODULE_UPDATE_HASH] DeprecationWarning: Module.updateHash: Use new ChunkGraph API
(Use `node --trace-deprecation ...` to show where the warning was created)
✓ Compiled successfully
✓ Linting and checking validity of types
✓ Collecting page data
Generating static pages (0/8) [= ]TypeError: Cannot read properties of undefined (reading 'root')
at t.renderInput (S:\git-projects\personal-review\.next\server\app\reviews\events\page.js:504:3311)
at t.renderSelect (S:\git-projects\personal-review\.next\server\app\reviews\events\page.js:504:2593)
at t.renderElement (S:\git-projects\personal-review\.next\server\app\reviews\events\page.js:552:1002)
at t.render (S:\git-projects\personal-review\.next\server\app\reviews\events\page.js:554:2180)
at nO (S:\git-projects\personal-review\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:46144)
at nM (S:\git-projects\personal-review\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:47238)
at nL (S:\git-projects\personal-review\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:64677)
at nB (S:\git-projects\personal-review\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:67660)
at nF (S:\git-projects\personal-review\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:66827)
at nL (S:\git-projects\personal-review\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:64993)
Error occurred prerendering page "/reviews/events". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: Cannot read properties of undefined (reading 'root')
at t.renderInput (S:\git-projects\personal-review\.next\server\app\reviews\events\page.js:504:3311)
at t.renderSelect (S:\git-projects\personal-review\.next\server\app\reviews\events\page.js:504:2593)
at t.renderElement (S:\git-projects\personal-review\.next\server\app\reviews\events\page.js:552:1002)
at t.render (S:\git-projects\personal-review\.next\server\app\reviews\events\page.js:554:2180)
at nO (S:\git-projects\personal-review\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:46144)
at nM (S:\git-projects\personal-review\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:47238)
at nL (S:\git-projects\personal-review\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:64677)
at nB (S:\git-projects\personal-review\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:67660)
at nF (S:\git-projects\personal-review\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:66827)
at nL (S:\git-projects\personal-review\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:64993)
✓ Generating static pages (8/8)
> Export encountered errors on following paths:
/reviews/events/page: /reviews/events
The build is failing when i have dropdown like this.
const surveyJson = {
pages: [
{
elements: [
{
type: "dropdown",
name: "institution",
title: "Institution",
isRequired: true,
choices: ["Value here"],
},
...
],
}, ], }
@anburocky3 You can check our react next template.
Thank you, Andrew
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