Server Error on Plasmic Sync

Server Error
Error: PLASMIC: Failed to load render__jJy9h9Y2__T.js: ReferenceError: a is not defined
This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
Registry.load
file:///Users/rjames/code/next-maintenance-logging/node_modules/@plasmicapp/loader-core/dist/loader-core.cjs.development.js (260:13)
ComponentLookup.getComponent
file:///Users/rjames/code/next-maintenance-logging/node_modules/@plasmicapp/loader-react/dist/loader-react.cjs.development.js (971:31)
usePlasmicComponent
file:///Users/rjames/code/next-maintenance-logging/node_modules/@plasmicapp/loader-react/dist/loader-react.cjs.development.js (2273:54)
PlasmicComponent
file:///Users/rjames/code/next-maintenance-logging/node_modules/@plasmicapp/loader-react/dist/loader-react.cjs.development.js (2322:19)
renderWithHooks

I made some changes to my pages from plaasmic studio and ran plasmic sync --porjects project_id and my code started throwing the above error

Meanwhile , I was initially having the below error before i ran into the above error

Error: Must specify a value prop for Pi
This error happened while trying to generate the page. Any console logs will be displayed on the terminal

Call Stack
<File://Users/rjames/code/next-maintenance-logging/node_modules/@plasmicapp/loader-core/dis/loader-core.cjs.development.js(248)>

Please any idea on how to fix these errors

can you link me to the project?

https://studio.plasmic.app/projects/fAUGSepiVXBsEXwhq6NtKN/branch/main@latest/page/DBA

hmm looks like in the Select component, there’s a default Option without a value prop set. Deleting it should do the trick:

I deleted the entire selection component and the error persists.

@chungwu This error indicates that there is a reference to an undefined variable a in the render__D38EFupKWZL.js file. It is occurring within the Plasmic code, which is used for visual development of React components.

hmm I seem to be able to do a build fine with that project when I create it from npx create-plasmic-app@latest

Yes I can do a build as well. When I attempt to npm run dev that’s when I get the issue

@chungwu Hey, I am getting similar error. Running dev server console is clear, I see it only on production build:

main-613e2b58e696e9e0.js:1 Error: PLASMIC: Failed to load render__V1kcI3eaVg.js: Error: Unknown module chunk-NQ3FD6T6.js
    at Registry.load (539-cbaeefa137e9e569.js:1:9121)
    at r3.getComponent (539-cbaeefa137e9e569.js:24:28813)
    at nv (539-cbaeefa137e9e569.js:27:9627)
    at nb (539-cbaeefa137e9e569.js:27:10227)
    at lk (framework-d91de5ee777f3fbe.js:25:60901)
    at i (framework-d91de5ee777f3fbe.js:25:119422)
    at uD (framework-d91de5ee777f3fbe.js:25:99075)
    at framework-d91de5ee777f3fbe.js:25:94124
    at ux (framework-d91de5ee777f3fbe.js:25:94131)
    at x (framework-d91de5ee777f3fbe.js:57:1364)

Can you take a look at it? next version: 13.5.5, @plasmicapp/loader-nextjs: ^1.0.361, project id: cLVv8FKY8Hkdifi3G7BEV7

Thank you very much!

Hey, I have fixed this issue by downgrading the next version to 13.5.1 and @plasmicapp/loader-nextjs to 1.0.299. I noticed I’m encountering the same error with next 14.1.0 version as well. Is Plasmic compatible with v14 or not yet?

Hello,

I am also experiencing this same issue. On @plasmicapp/loader-nextjs version 1.0.356, everything works perfectly. After the update to version 1.0.377 (latest as of today), I have started experiencing this errors. The problem is, if Plasmic Preview is ON, the page loads completely fine. However, when switching preview OFF, then I get the same error:

Error: PLASMIC: Failed to load render__MhU1tgC6OZ1h.js: Error: Unknown module chunk-AFPHOITT.js
    at Registry.load (webpack-internal:///./node_modules/@plasmicapp/loader-core/dist/index.esm.js:234:13)
    at ComponentLookup.getComponent (webpack-internal:///./node_modules/@plasmicapp/loader-react/dist/index.esm.js:718:33)
    at usePlasmicComponent (webpack-internal:///./node_modules/@plasmicapp/loader-react/dist/index.esm.js:1282:56)
    at PlasmicComponent (webpack-internal:///./node_modules/@plasmicapp/loader-react/dist/index.esm.js:1327:21)
    at renderWithHooks (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:16305:18)
    at mountIndeterminateComponent (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:20069:13)
    at beginWork (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:21582:16)
    at beginWork$1 (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:27421:14)
    at performUnitOfWork (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:26552:12)
    at workLoopSync (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:26461:5)
    at renderRootSync (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:26429:7)
    at recoverFromConcurrentError (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:25845:20)
    at performSyncWorkOnRoot (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:26091:20)
    at flushSyncCallbacks (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:12042:22)
    at eval (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:25646:13)

Considering @chungwu response to this issue from @empirical_halibut, I have tried to unregister all code components and site contexts, creating a blank page to check whether or not this was an issue related to some component props. Unluckily, I am getting the same error.

I would really appreciate if anyone could guide me to the solution of this problem.

Thanks :slight_smile:

PD: My projectId is 6Cqb81BHPWH818gtSrvzZR