What happened?
⨯ unhandledRejection [ReferenceError: module is not defined in ES module scope This file is being treated as an ES module because it has a '.js' file extension and 'frontend/node_modules/.pnpm/react-onesignal@3.2.3/node_modules/react-onesignal/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.] { type: 'ReferenceError' }
When using pnpm we get this error, we can fix this by renaming
mv node_modules/.pnpm/react-onesignal@3.2.3/node_modules/react-onesignal/dist/index.js node_modules/.pnpm/react-onesignal@3.2.3/node_modules/react-onesignal/dist/index.cjs
What browsers are you seeing the problem on?
Other
What operating system are you running?
macOS 15.5
Steps to reproduce?
Node 20.19.2
pnp 10.11
next 15.1.6
react 19.0.0
reacct-onesignal 3.2.3
pnpm install
next build
What did you expect to happen?
expected it to build
Relevant log output
What happened?
⨯ unhandledRejection [ReferenceError: module is not defined in ES module scope This file is being treated as an ES module because it has a '.js' file extension and 'frontend/node_modules/.pnpm/react-onesignal@3.2.3/node_modules/react-onesignal/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.] { type: 'ReferenceError' }When using pnpm we get this error, we can fix this by renaming
mv node_modules/.pnpm/react-onesignal@3.2.3/node_modules/react-onesignal/dist/index.js node_modules/.pnpm/react-onesignal@3.2.3/node_modules/react-onesignal/dist/index.cjs
What browsers are you seeing the problem on?
Other
What operating system are you running?
macOS 15.5
Steps to reproduce?
What did you expect to happen?
expected it to build
Relevant log output