# Pushes stop deploying to Fly: build fails on a package that only exists on your machine

> A script under src/ imported a package that was installed locally but never added to package.json.

Web page: https://davidewins.com/errors/fly-deploy-fails-extraneous-local-package

Fly.io. Confirmed fix, 13 September 2026.

Versions: Node 22 Docker image (npm 10); local Node 25

Error:

```
puppeteer-core  (npm ls: extraneous)
```

## Cause

A script under src/ imported a package that was installed locally but never added to package.json. Locally tsc passed; Fly's clean `npm ci && npm run build` compiled all of src/ and failed, so production stayed on an old release for several pushes.

## Fix

1. Find it: `npm ls` flags it as extraneous.
2. Add it properly: `npm install <pkg>` so it lands in package.json and the lockfile.
3. Reproduce Fly's build in a clean worktree before pushing:
```bash
npx -y npm@10 ci --include=dev && npm run build
```
4. After each push, confirm a new release appeared (`flyctl releases -a <app>`) rather than assuming it deployed.

## More Fly.io errors

- [Fly auto-deploy from GitHub silently stops after renaming the GitHub owner](https://davidewins.com/errors/fly-github-autodeploy-stops-after-owner-rename)

[Search all errors](https://davidewins.com/errors)
