Skip to content

After update to Node 10-alpine - ERR_STREAM_CANNOT_PIPE #29690

@sashberd

Description

@sashberd

After I updated our server node JS to Node 10-alpine version I started to get next error

Error [ERR_STREAM_CANNOT_PIPE]: Cannot pipe, not readable.

I have to mention that with node 8-alpine this code is working (I tried with rollback)

In my code I am trying to return file from GCloud:

try {
        const file = await 
         gcs.bucket(`BUCKET_NAME`).file(filePath);

        if (file) {
            const results = await file.getMetadata();
            const stream = await file.createReadStream();
            return res.pipe(stream);
            else {
                return send(res, 403)
            }
        }
        else {
            return send(res, 404);
        }
    } catch (err) {
        console.error(err);
        return send(res, 500);
    }

Is any one met such issue after upgrade to node -10 -alpine?

Metadata

Metadata

Assignees

No one assigned

    Labels

    streamIssues and PRs related to the stream subsystem.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions