Fix broken UB-dashboard build
Opened this issue · 0 comments
tarjelavik commented
UB-dashboard build is broken. The build is failing with the following error:
> ub-dashboard@0.1.0 build
> next build
▲ Next.js 14.2.4
- Environments: .env.production.local
Creating an optimized production build ...
⚠ Compiled with warnings
../../node_modules/rdf-canonize/lib/index.js
Module not found: Can't resolve 'rdf-canonize-native' in '/Users/.../code/uib-ub-monorepo/node_modules/rdf-canonize/lib'
Import trace for requested module:
../../node_modules/rdf-canonize/lib/index.js
../../node_modules/rdf-canonize/index.js
../../node_modules/jsonld/lib/jsonld.js
../../node_modules/jsonld/lib/index.js
./src/app/(dashboard)/qa/validation/marcus/page.tsx
✓ Compiled successfully
Linting and checking validity of types .. ⨯ ESLint: Invalid Options: - Unknown options: useEslintrc, extensions - 'extensions' has been removed.
✓ Linting and checking validity of types
⚠ Using edge runtime on a page currently disables static generation for that page
✓ Collecting page data
Generating static pages (0/18) [= ]TypeError: Cannot read properties of null (reading 'useContext')
at exports.useContext (/Users/.../code/uib-ub-monorepo/node_modules/react/cjs/react.production.min.js:24:118)
at StyleRegistry (/Users/.../code/uib-ub-monorepo/node_modules/styled-jsx/dist/index/index.js:450:30)
at Wc (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:68:44)
at Zc (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:253)
at Z (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
at Zc (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:74:209)
at Z (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
at Zc (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:74:209)
at Z (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
at Zc (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:74:209)
Error occurred prerendering page "/500". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: Cannot read properties of null (reading 'useContext')
at exports.useContext (/Users/.../code/uib-ub-monorepo/node_modules/react/cjs/react.production.min.js:24:118)
at StyleRegistry (/Users/.../code/uib-ub-monorepo/node_modules/styled-jsx/dist/index/index.js:450:30)
at Wc (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:68:44)
at Zc (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:253)
at Z (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
at Zc (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:74:209)
at Z (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
at Zc (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:74:209)
at Z (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
at Zc (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:74:209)
TypeError: Cannot read properties of null (reading 'useContext')
at exports.useContext (/Users/.../code/uib-ub-monorepo/node_modules/react/cjs/react.production.min.js:24:118)
at StyleRegistry (/Users/.../code/uib-ub-monorepo/node_modules/styled-jsx/dist/index/index.js:450:30)
at Wc (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:68:44)
at Zc (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:253)
at Z (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
at Zc (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:74:209)
at Z (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
at Zc (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:74:209)
at Z (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
at Zc (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:74:209)
Error occurred prerendering page "/404". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: Cannot read properties of null (reading 'useContext')
at exports.useContext (/Users/.../code/uib-ub-monorepo/node_modules/react/cjs/react.production.min.js:24:118)
at StyleRegistry (/Users/.../code/uib-ub-monorepo/node_modules/styled-jsx/dist/index/index.js:450:30)
at Wc (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:68:44)
at Zc (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:253)
at Z (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
at Zc (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:74:209)
at Z (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
at Zc (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:74:209)
at Z (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
at Zc (/Users/.../code/uib-ub-monorepo/apps/ub-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:74:209)
✓ Generating static pages (18/18)
> Export encountered errors on following paths:
/_error: /404
/_error: /500
npm ERR! Lifecycle script `build` failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: ub-dashboard@0.1.0
npm ERR! at location: /Users/.../code/uib-ub-monorepo/apps/ub-dashboard