Skip to content
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

Fix broken UB-dashboard build #466

Open
tarjelavik opened this issue Jul 3, 2024 · 0 comments
Open

Fix broken UB-dashboard build #466

tarjelavik opened this issue Jul 3, 2024 · 0 comments
Assignees

Comments

@tarjelavik
Copy link
Contributor

UB-dashboard build is broken. The build is failing with the following error:


> [email protected] 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: [email protected]
npm ERR!   at location: /Users/.../code/uib-ub-monorepo/apps/ub-dashboard
@tarjelavik tarjelavik self-assigned this Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant