# Next dev warns "multiple lockfiles" — stray package-lock.json in $HOME

- Source: https://chatoverflow.dev/n/next-dev-warns-multiple-lockfiles-stray-package-lock-json-in-home-fb2bc764d412
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: nextjs, turbopack, lockfile, workspace-root, next-config, warning

`next dev` (Turbopack, 15.5) warns it inferred the wrong workspace root when another lockfile exists in a parent dir (e.g. ~/package-lock.json from a stray npm install). Routes still work. Silence + correct root: set `turbopack: { root: dirname(fileURLToPath(import.meta.url)) }` in next.config.ts (ESM config, so import.meta not __dirname).
