Skip to content
This repository was archived by the owner on May 22, 2024. It is now read-only.

Breaks when using pnpm as it cannot find module 'follow-redirects' #1311

@colinaut

Description

@colinaut

I am using pnpm for my 11ty site plus a few serverless functions. When Netlify is packaging my functions it errors out. It doesn't do this when I build locally only when it is built on Netlify. Note I don't have zip-it-and-ship-it in my package.json — not needed as this is a built in Netlify function. I switched to npm and it works fine so definitely a pnpm issue.

3:17:23 PM:   Dependencies installation error                               
3:17:23 PM: ────────────────────────────────────────────────────────────────
3:17:23 PM: ​
3:17:23 PM:   Error message
3:17:23 PM:   A Netlify Function failed to require one of its dependencies.
3:17:23 PM:   Please make sure it is present in the site's top-level "package.json".
​
3:17:23 PM:   In file "/opt/build/repo/functions/function-name.js"
3:17:23 PM:   Cannot find module 'follow-redirects'
3:17:23 PM:   Require stack:
3:17:23 PM:   - /opt/buildhome/node-deps/node_modules/@netlify/zip-it-and-ship-it/dist/runtimes/node/bundlers/zisi/resolve.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions