Giter Site home page Giter Site logo

Comments (3)

gfx avatar gfx commented on June 4, 2024 1

I see. Thank you.

That seems odd ... I think this library should work with nodejs v12 because it does not depend on any specific features in the latest nodejs or ECMA-262. I'll personally investigate it with nodejs v12. Closing.

from msgpack-javascript.

gfx avatar gfx commented on June 4, 2024

Thank you for your report. This seems a bug in this library. Could you give me an input that causes the error?


By the way, I'm not sure it is related to this issue, but you should not mutate the object in an encoder (i.e. delete object[field];). It may lead to unexpected behaviors. I'll explicitly state the behavior in README.md.

If you'd like to mutate an object to be encoded, you can mutate it just before passing it to encode():

export function encodeStatsJson(stats: StatsJson) {
  const filteredFields = ['name'];
  for (const field of filteredFields) {
    delete stats[field];
  }
  const encoded = encode(stats, { extensionCodec });
  return Buffer.from(encoded, encoded.byteOffset, encoded.byteLength);
}

from msgpack-javascript.

vera-wcy avatar vera-wcy commented on June 4, 2024

Regarding this issue, I found that upgrading the Node 16 version will not have this error (I used Node v16.16.0). The input about this error is an oversized object that I can't give you, it's about the collection of project webpack stats objects.

from msgpack-javascript.

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.