Error: Received packet in the wrong sequence. [Netlify Functions]

Hi, I’ve recently converted my express app to netlify functions. I am running the code locally and have not yet built or deployed.

I set up a test route, /hello, which spits out some json. When making a request, I’m able to get the correct response from the server, but this error appears in the console and the server is terminated.
Does anyone know what could be causing this? Thanks.

Error:

Error: Received packet in the wrong sequence.
at p._parsePacket (Q:\React Apps\Pulse API\pulse-api\functions\app.js:325:93008)
at p._parsePacket (Q:\React Apps\Pulse API\pulse-api\functions\app.js:325:101737)
at p.write (Q:\React Apps\Pulse API\pulse-api\functions\app.js:325:95965)
at p.write (Q:\React Apps\Pulse API\pulse-api\functions\app.js:325:89476)
at Socket. (Q:\React Apps\Pulse API\pulse-api\functions\app.js:71:2421)
at Socket. (Q:\React Apps\Pulse API\pulse-api\functions\app.js:71:1523)
at Socket.emit (events.js:315:20)
at addChunk (_stream_readable.js:309:12)
at readableAddChunk (_stream_readable.js:284:9)
at Socket.Readable.push (_stream_readable.js:223:10)
at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
--------------------
at p._enqueue (Q:\React Apps\Pulse API\pulse-api\functions\app.js:325:90854)
at p.handshake (Q:\React Apps\Pulse API\pulse-api\functions\app.js:325:89599)
at _.connect (Q:\React Apps\Pulse API\pulse-api\functions\app.js:71:3293)
at Object. (Q:\React Apps\Pulse API\pulse-api\functions\app.js:325:28905)
at n (Q:\React Apps\Pulse API\pulse-api\functions\app.js:1:158)
at Object. (Q:\React Apps\Pulse API\pulse-api\functions\app.js:325:27328)
at n (Q:\React Apps\Pulse API\pulse-api\functions\app.js:1:158)
at Object. (Q:\React Apps\Pulse API\pulse-api\functions\app.js:154:56763)
at n (Q:\React Apps\Pulse API\pulse-api\functions\app.js:1:158)
at Q:\React Apps\Pulse API\pulse-api\functions\app.js:1:957
at Object. (Q:\React Apps\Pulse API\pulse-api\functions\app.js:1:967)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19) {
code: ‘PROTOCOL_INCORRECT_PACKET_SEQUENCE’,
fatal: true
}

Hi @EthanCrabb,

This might be related:

If not, it would help us if you could share a repo so we could test.

1 Like

This works! But what changes do I need to make to my deploy settings? eg: build command

Hi @EthanCrabb,

If you say it works, doesn’t it mean you got it working? What exactly do you mean when you say you need to change deploy settings?

It can help if you share your repo.

I figured it out myself, I just removed the build command and deployed as is. Thanks for your help, greatly appreciated.