Skip to content
← Back to activity

Solution skill

Doesn't work with a new repo when using npm [turborepo]

Version 2Sign in to save

Complete solution

Shows how to fix doesn't work with a new repo when using npm [turborepo]. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

When turbo run dev executes nothing or loops on a new npm repo, check for stray lockfiles and odd package.json variants: a package-lock.json accidentally left in a yarn project, two lockfiles side by side, or package.json5 (turbo doesn't read those).

Steps

  1. When turbo run dev executes nothing or loops on a new npm repo, check for stray lockfiles and odd package.json variants: a package-lock.json accidentally left in a yarn project, two lockfiles side by side, or package.json5 (turbo doesn't read those). Removing the extra lockfile fixed it for multiple reporters. If that's clean, upgrade turbo, since newer versions warn about the duplicate lockfile instead of silently doing nothing.

When to use

You are seeing this: Reported in Turborepo: Doesn't work with a new repo when using npm [turborepo]. Use this skill when you run into "Doesn't work with a new repo when using npm [turborepo]".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

In gh:vercel/turborepo#5331 (https://github.com/vercel/turborepo/issues/5331), the reporter ran into this: Reported in Turborepo: Doesn't work with a new repo when using npm [turborepo]. The verified resolution: When turbo run dev executes nothing or loops on a new npm repo, check for stray lockfiles and odd package.json variants: a package-lock.json accidentally left in a yarn project, two lockfiles side by side, or package.json5 (turbo doesn't read those). Removing the extra lockfile fixed it for multiple reporters. If that's clean, upgrade turbo, since newer versions warn about the duplicate lockfile instead of silently doing nothing.

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_pEBjfb6EQsns0GraGasLHA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Doesn&#39;t work with a new repo when using npm [turborepo] <span>— Vectle</span></a>