Skip to content

nodejs.install no longer able to resolve non-npm deps #6685

@mclean25

Description

@mclean25

We're seeing deploy failures after upgrading SST beyond 4.6.4 in a pnpm monorepo.

We use pnpm workspaces and catalog: versions from pnpm-workspace.yaml. It looks like this started after #5988, when nodejs.install began resolving the nearest package.json from the handler directory.

repo-root/
├── pnpm-workspace.yaml
├── sst.config.ts
└── packages/
    └── functions/
        ├── package.json
        └── publicCompanies/
            └── some-lambda.ts

In our case, SST now picks up packages/functions/package.json, which contains catalog: dependencies. SST then runs npm install for nodejs.install, and npm fails because it cannot parse catalog: specifiers.

In our SST function config for the problematic runner, we have this:

  nodejs: runningLocally
    ? defaultFunctionArgs?.nodejs
    : {
        ...getDefaultNodejsOptions(),
        esbuild: {
          external: ["@sparticuz/chromium", "playwright-core", "chromium-bidi"],
        },
        install: ["@sparticuz/chromium", "playwright-core", "chromium-bidi"],
        sourcemap: runningLocally || isReviewAppStage(),
      },

Initial SST/Pulumi error:

Error: failed to run npm install: exit status 1
    at IncomingMessage.<anonymous> (file:///Users/alex/dev/client-app/.sst/platform/src/components/rpc/rpc.ts:42:22)
    at IncomingMessage.emit (node:events:531:35)
    at IncomingMessage.emit (node:domain:489:12)
    at endReadableNT (node:internal/streams/readable:1698:12)
    at processTicksAndRejections (node:internal/process/task_queues:90:21) {
  promise: Promise { <rejected> [Circular *1] }
}

And the more useful underlying error from .sst/log/sst.log:

time=2026-04-01T15:48:11.526-07:00 level=INFO msg=installing service=runtime.node functionID=ImportPublicFilingsStateMachineCustomPrinter packages="[@sparticuz/chromium playwright-core]"
time=2026-04-01T15:48:11.527-07:00 level=INFO msg="running npm" service=runtime.node functionID=ImportPublicFilingsStateMachineCustomPrinter cmd="[install --force --platform=linux --os=linux --arch=x64 --cpu=x64]"
time=2026-04-01T15:48:12.619-07:00 level=INFO msg="npm output" output="npm warn using --force Recommended protections disabled.\nnpm error code EUNSUPPORTEDPROTOCOL\nnpm error Unsupported URL Type \"catalog:\": catalog:shared\nnpm error A complete log of this run can be found in: /Users/alex/.npm/_logs/2026-04-01T22_48_11_711Z-debug-0.log\n"

Metadata

Metadata

Assignees

Labels

No labels
No labels

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