Giter Site home page Giter Site logo

Comments (8)

wesleytodd avatar wesleytodd commented on April 29, 2024

Can you post some example code where it is having this error behavior?

from express.

robertlario avatar robertlario commented on April 29, 2024

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.

wesleytodd avatar wesleytodd commented on April 29, 2024

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.

robertlario avatar robertlario commented on April 29, 2024

at line 34 in response.js

var mime = send.mime;

send.mime appears to be undefined.

Any thoughts?

from express.

wesleytodd avatar wesleytodd commented on April 29, 2024

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.

wesleytodd avatar wesleytodd commented on April 29, 2024

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.

robertlario avatar robertlario commented on April 29, 2024

It was a versioning issue! :-( What a nightmare!

Please consider the issue closed. Thank you for your help!

from express.

wesleytodd avatar wesleytodd commented on April 29, 2024

Haha, no problem. Glad you got it sorted out!

from express.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.