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

Node 21.2 breaking changes #6

Closed
jamie-phlo opened this issue Nov 20, 2023 · 1 comment
Closed

Node 21.2 breaking changes #6

jamie-phlo opened this issue Nov 20, 2023 · 1 comment

Comments

@jamie-phlo
Copy link

I was using Node 21.2 and started seeing errors from this package:

/home/_agent/_work/1/s/node_modules/stream-shift/index.js:16
    return state.buffer[0].length
                           ^

TypeError: Cannot read properties of null (reading 'length')
    at getStateLength (/home/_agent/_work/1/s/node_modules/stream-shift/index.js:16:28)
    at shift (/home/_agent/_work/1/s/node_modules/stream-shift/index.js:6:99)
    at Duplexify._forward (/home/_agent/_work/1/s/node_modules/duplexify/index.js:170:35)
    at PassThrough.onreadable (/home/_agent/_work/1/s/node_modules/duplexify/index.js:136:10)
    at PassThrough.emit (node:events:519:28)
    at emitReadable_ (node:internal/streams/readable:832:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:81:21)

Node.js v21.2.0

I believe this is due to this change in Node 21.2 here nodejs/node#50341

Is this something that could be fixed? I don't understand enough of the implementation of this library to suggest how to to fix unfortunately.

@henrik242
Copy link

I'm dropping by to say that this is a problem with node 20.16.0 too, since this is the first search result on Google. The issue is fixed by adding a resolutions entry to package.json:

  "resolutions": {
    "stream-shift": "1.0.3"
  },

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

Successfully merging a pull request may close this issue.

3 participants