firebase / firebase/apphosting-adapters

`@apphosting/build` is missing `yaml` in its declared dependencies

Open Beginner friendly
#556 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
478
Forks
1.5k
Avg merge
3d 22h
Merged PRs (30d)
2

Description

`@apphosting/build@0.1.7` requires `yaml` at runtime (`dist/index.js:13`) but does not list it in its `dependencies`. This works under npm's flat `node_modules` layout (where `yaml` is hoisted from a sibling package), but fails under pnpm's strict isolation:

```
Error: Cannot find module 'yaml'
Require stack:
- .../node_modules/@apphosting/build/dist/index.js
- .../node_modules/firebase-tools/lib/apphosting/localbuilds.js
- .../node_modules/firebase-tools/lib/deploy/apphosting/prepare.js
...
```

**Steps to reproduce**:
1. Use pnpm with `hoist: false` in a workspace
2. Install `firebase-tools@15.13.0`
3. Run `firebase deploy --only functions`

**Expected**: Deploy succeeds — `@apphosting/build` resolves `yaml` from its own dependencies.

**Actual**: `Cannot find module 'yaml'` error.

**Workaround**: Add a `packageExtensions` entry in `pnpm-workspace.yaml`:
```yaml
packageExtensions:
"@apphosting/build@0":
dependencies:
yaml: "*"
```

**Fix**: Add `yaml` to `dependencies` in `packages/@apphosting/build/package.json`.

Contributor guide

Open the contributing guide

Research direction

Open packages/@apphosting/build/package.json and inspect its existing dependency declarations; the issue identifies the missing runtime package as yaml. Add yaml to dependencies, then reproduce with pnpm using hoist: false and run firebase deploy --only functions; done means deployment no longer reports Cannot find module 'yaml'.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, yaml
Domain
build-system
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.