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

TypeError: Class extends value undefined is not a constructor or null #158

Open
thathurtabit opened this issue Apr 15, 2024 · 3 comments
Open

Comments

@thathurtabit
Copy link

Hello. I'm not sure if this is down to always annoying CJS/MJS issue(s), but when building my app through Docker, I get the following error, despite being able to build the app successfully when running locally.

Error:

 ⠋ Container atds-usage-reports-app-1  Recreated                                                                                                                                                                          0.0s 
Attaching to app-1
app-1  | /usr/local/namespace/app/node_modules/@hono/node-server/dist/index.js:46
app-1  | var Request = class extends GlobalRequest {
app-1  |               ^
app-1  | 
app-1  | TypeError: Class extends value undefined is not a constructor or null
app-1  |     at Object.<anonymous> (/usr/local/namespace/app/node_modules/@hono/node-server/dist/index.js:46:15)
app-1  |     at Module._compile (node:internal/modules/cjs/loader:1369:14)
app-1  |     at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
app-1  |     at Module.load (node:internal/modules/cjs/loader:1206:32)
app-1  |     at Module._load (node:internal/modules/cjs/loader:1022:12)
app-1  |     at Module.require (node:internal/modules/cjs/loader:1231:19)
app-1  |     at require (node:internal/modules/helpers:179:18)
app-1  |     at Object.<anonymous> (/usr/local/autotrader/app/dist/index.js:3:23)
app-1  |     at Module._compile (node:internal/modules/cjs/loader:1369:14)
app-1  |     at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
app-1  | 
app-1  | Node.js v20.12.1
app-1 exited with code 1

Looking at my node_modules locally (node_modules/@hono/node-server/dist/index.js:46:15) things do seem to be fine.

Screenshot 2024-04-15 at 15 44 40

I'm really confused as to why by build (only in Docker) seems to not know about the GlobalRequest class declared above.

@charlieforward9
Copy link

charlieforward9 commented Jul 4, 2024

I am also having this error when trying to build Vite on GitHub Pages. Everything checks off locally, dev/build/preview

`at file:///home/runner/work/.../node_modules/@hono/node-server/dist/index.mjs:20:15`

@charlieforward9
Copy link

Dependent issue: aidenybai/million#1071

@abhishiv
Copy link

abhishiv commented Aug 6, 2024

Old node version I guess

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

3 participants