question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

node 17.5.0 buf.slice Deprecated!

See original GitHub issue

let nc = await connect() throw // reader closed RangeError: Maximum call stack size exceeded

ENV node 17.5.0 Deprecated: Use buf.subarray instead.

class Parser {
    constructor(dispatcher) {
        this.dispatcher = dispatcher;
        this.state = State.OP_START;
        this.as = 0;
        this.drop = 0;
        this.hdr = 0;
    }
    parse(buf) {
        // @ts-ignore: on node.js module is a global
        if (typeof module !== "undefined" && module.exports) {
            // Uint8Array.slice() copies in node it doesn't and it is faster
            buf.subarray = buf.slice;
        }
        ...

fix plz

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
aricartcommented, May 2, 2022

@ArmorDarks the issue is already fixed in the current release.

2reactions
aricartcommented, Feb 14, 2022

@homaily @mmd-app npm update nats@latest.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node v17.5.0 (Current)
Adds experimental support to the fetch API. This adds a --experimental-fetch flag that installs the fetch , Request , Response and Headers ...
Read more >
Node.js : difference between Buffer.slice and Buffer.subarray
Buffer.slice is now deprecated (since node 16.x LTS). So now use Buffer.subarray !
Read more >
Node.js ES2015/ES6, ES2016 and ES2017 support
Yes. Yes Yes. Yes Error. Error Error. Error Error. Error Error. Error function() function() function() function() function() function() function() function() function() function() function() function() function() function()...
Read more >
Download & Update Node.js to the Latest Version! Node v19 ...
Changelog for Node Version 18.7.0 (Current). doc: add F3n67u to collaborators; deprecate coercion to integer in process.exit; (SEMVER-MINOR) ...
Read more >
nodejs/node v17.5.0 on GitHub - NewReleases.io
2022-02-10, Version 17.5.0 (Current), @ruyadorno. on GitHub ... [ 2e7bf00359 ] - (SEMVER-MINOR) doc: deprecate buffer.slice (Benjamin Gruenbaum) #41596 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found