firebase / firebase/apphosting-adapters
@apphosting/build missing yaml dependency
- Dominant language
- TypeScript
- Stars
- 478
- Forks
- 1.5k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 2
Description
The `@apphosting/build@0.1.7` package imports `yaml` but does not declare it as a dependency in `package.json`. This causes
`firebase deploy` to fail with Error: `Cannot find module 'yaml'`.
# details
In [@apphosting/build/index.ts:7](https://github.com/FirebaseExtended/firebase-framework-tools/blob/main/packages/%40apphosting/build/src/index.ts#L7), there is:
```ts
import { parse as parseYaml } from "yaml";
```
However, [@apphosting/buildpackage.json](https://github.com/FirebaseExtended/firebase-framework-tools/blob/main/packages/%40apphosting/build/package.json) does not include yaml in its dependencies:
```json
"dependencies": {
"@apphosting/common": "*",
"@npmcli/promise-spawn": "^3.0.0",
"colorette": "^2.0.20",
"commander": "^11.1.0",
"npm-pick-manifest": "^9.0.0",
"ts-node": "^10.9.1"
},
"devDependencies": {
"@types/commander": "*",
"ts-mocha": "*",
"ts-node": "*",
"typescript": "*"
}
```
While `firebase-tools` does have `yaml` in its own dependencies, it gets installed nested at `node_modules/firebase-tools/node_modules/yaml`, which `@apphosting/build` (installed at top-level `node_modules/@apphosting/build`) cannot resolve.
Contributor guide
Assessment
This issue has not been assessed yet.