mirror of
https://github.com/pnpm/pnpm.git
synced 2026-02-02 03:02:49 -05:00
fix: better no lockfile error
This commit is contained in:
6
.changeset/smart-gorillas-trade.md
Normal file
6
.changeset/smart-gorillas-trade.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/outdated": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
When the `pnpm outdated` command fails, print in which directory it failed.
|
||||
@@ -49,7 +49,7 @@ export async function outdated (
|
||||
): Promise<OutdatedPackage[]> {
|
||||
if (packageHasNoDeps(opts.manifest)) return []
|
||||
if (opts.wantedLockfile == null) {
|
||||
throw new PnpmError('OUTDATED_NO_LOCKFILE', 'No lockfile in this directory. Run `pnpm install` to generate one.')
|
||||
throw new PnpmError('OUTDATED_NO_LOCKFILE', `No lockfile in directory "${opts.lockfileDir}". Run \`pnpm install\` to generate one.`)
|
||||
}
|
||||
const allDeps = getAllDependenciesFromManifest(opts.manifest)
|
||||
const importerId = getLockfileImporterId(opts.lockfileDir, opts.prefix)
|
||||
|
||||
Reference in New Issue
Block a user