Comments (8)
Can you post some example code where it is having this error behavior?
from express.
I am trying to run my code in serverless-offline.
I do not call the code directly.
Here is the stack trace:
TypeError: Cannot read properties of undefined (reading 'charsets')
at ServerResponse.header (..\node_modules\express\lib\response.js:790:1)
at ServerResponse.contentType (..\node_modules\express\lib\response.js:625:1)
at setContentTypeMiddleware (..\lib\router\middlewares\setContentType.js:15:1)
at Layer.handle [as handle_request] (..\node_modules\express\lib\router\layer.js:95:1)
at trim_prefix (..\node_modules\express\lib\router\index.js:328:1)
at ..\node_modules\express\lib\router\index.js:286:1
at Function.process_params (..\node_modules\express\lib\router\index.js:346:1)
at next (..\node_modules\express\lib\router\index.js:280:1)
at ..\lib\router\middlewares\setServerUrl.js:26:1
at .webpack\service\src\index.js:154906:9 {stack: 'TypeError: Cannot read properties of undefine…oyment.webpack\service\src\index.js:154906:9', message: 'Cannot read properties of undefined (reading 'charsets')'}
Here are my modules:
@types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @typescript-eslint/[email protected]
├── @typescript-eslint/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
from express.
I don't know what serverless offline is, but in the stack I see this is the closes thing that looks like user land code: at ..\lib\router\middlewares\setServerUrl.js:26:1
from express.
at line 34 in response.js
var mime = send.mime;
send.mime appears to be undefined.
Any thoughts?
from express.
https://github.com/pillarjs/send/blob/master/index.js#L71
I looked at that initially and am not sure how it could be. That is why I would need more to go off of to debug.
from express.
Also, the npm ls
output you showed doesn't show these things afaict. If you think it is something with the packages installed please post more of the output.
from express.
It was a versioning issue! :-( What a nightmare!
Please consider the issue closed. Thank you for your help!
from express.
Haha, no problem. Glad you got it sorted out!
from express.
Related Issues (20)
- How to send a request at JSON format using http module to an ExpressJS server? HOT 1
- when NODE_ENV='production' getting error on request send HOT 2
- How to flush a response? HOT 2
- Import syntax error with express.Router() import HOT 4
- How do you guys set the `req.hostname`? HOT 1
- [deleted] HOT 3
- Request triager role for @SarthakParikh HOT 1
- Working On Vite+React. Have an Issue. HOT 1
- 4.19.0 breaks passing new URL() into res.redirect(...) HOT 7
- The npm latest version of express is 5.0.0-beta.2 !!! HOT 10
- Troubleshooting Node.js Express Server Routing Issue HOT 1
- WebAssembly Out of memory Error for any server HOT 2
- return res.redirect('back'); returns to '/' instead of the previous page HOT 2
- Need a clarification on router.param() usage. HOT 4
- [Question] Should Express.js v5.x drop support to older versions of Node? HOT 3
- .get() attempting to grab from home dir (Linux) HOT 2
- Request triager role for Ivaylo-Iv HOT 1
- Request triager role for etroynov HOT 2
- clean code for switch condition HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from express.