Npm ERR! Cannot set properties of null (setting 'dev'), but build fine locally

For Workes & Pages, what is the name of the domain?

https://staging.redeployable-monorepo.pages.dev/

What is the error number?

1

What is the error message?

08:42:36.412 npm ERR! Cannot set properties of null (setting ‘dev’) 08:42:36.414 08:42:36.414 npm ERR! A complete log of this run can be found in: /opt/buildhome/.npm/_logs/2024-08-23T07_42_06_277Z-debug-0.log 08:42:36.445 Error: Exit with error code: 1 08:42:36.445 at ChildProcess. (/snapshot/dist/run-build.js) 08:42:36.446 at Object.onceWrapper (node:events:652:26) 08:42:36.446 at ChildProcess.emit (node:events:537:28) 08:42:36.446 at ChildProcess._handle.onexit (node:internal/child_process:291:12) 08:42:36.458 Failed: build command exited with code: 1 08:42:37.337 Failed: error occurred while running build command

What is the issue or error you’re encountering

I have deployed my project to pages, but keep getting this error

What are the steps to reproduce the issue?

My project is structured as follows:
/web-frontend

├── /packages
│ ├── /shared-libraries
| |----/shared-components # The shared component library
│ ├── /core # main React project

├── package.json # Root package.json