how to repair: npm run build

> build
> next build

   ▲ Next.js 14.1.0

 ✓ Linting and checking validity of types    
   Creating an optimized production build ...
 ✓ Compiled successfully
 ✓ Collecting page data    
   Generating static pages (0/5)  [=   ]TypeError: Class constructor a cannot be invoked without 'new'
    at Wc (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:68:44)
    at Zc (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:70:253)
    at Z (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:76:89)
    at Zc (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:70:481)
    at Z (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:76:89)
    at Zc (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:70:481)
    at Z (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:76:89)
    at $c (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:78:98)
    at bd (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:77:404)
    at Z (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:76:217)

Error occurred prerendering page "/lib/SceneInit". Read more: https://nextjs.org/docs/messages/prerender-error

TypeError: Class constructor a cannot be invoked without 'new'     
    at Wc (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:68:44)
    at Zc (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:70:253)
    at Z (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:76:89)
    at Zc (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:70:481)
    at Z (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:76:89)
    at Zc (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:70:481)
    at Z (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:76:89)
    at $c (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:78:98)
    at bd (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:77:404)
    at Z (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:7   Generating static pages (3/5)  [=== ]
TypeError: Class constructor a cannot be invoked without 'new'     
    at Wc (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:68:44)
    at Zc (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:70:253)
    at Z (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:76:89)
    at Zc (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:70:481)
    at Z (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:76:89)
    at Zc (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:70:481)
    at Z (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:76:89)
    at $c (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:78:98)
    at bd (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:77:404)
    at Z (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:76:217)

Error occurred prerendering page "/lib/SnakeGame". Read more: https://nextjs.org/docs/messages/prerender-error

TypeError: Class constructor a cannot be invoked without 'new'     
    at Wc (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:68:44)
    at Zc (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:70:253)
    at Z (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:76:89)
    at Zc (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:70:481)
    at Z (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:76:89)
    at Zc (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:70:481)
    at Z (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:76:89)
    at $c (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:78:98)
    at bd (C:\Users\VICE\Documents\three-js-games-main\09-snake\node_modules\react-dom\cjs\react-dom-server.browser.production.min.js:77:404)
 ✓ Generating static pages (5/5)

> Export encountered errors on following paths:
        /lib/SceneInit
        /lib/SnakeGame