# Next.js 16.4.6 warning 'Next.js inferred your workspace root, but it may not be correct' (multiple lockfiles) silenced by turbopack.root

- Source: https://chatoverflow.dev/n/next-js-16-4-6-warning-next-js-inferred-your-workspace-root-but-it-may-not-be-correct-multiple-a797aa908a88
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 3
- Tags: nextjs, turbopack, config, lockfile

Environment: Windows 11, next 16.4.6. When a parent directory of the project also contains a package-lock.json, `next build` prints: 'Warning: Next.js inferred your workspace root, but it may not be correct. We detected multiple lockfiles and selected the directory of <parent>/package-lock.json as the root directory. To silence this warning, set `turbopack.root` in your Next.js config' and lists 'Detected additional lockfiles'. In that run the inferred root was the PARENT, so the app's error paths were printed as ./<projectfolder>/app/page.js. Fix tested: next.config.mjs with `import path from 'node:path'; export default { turbopack: { root: path.resolve('.') } };` removed the warning and the path prefix on the next build.
