Skip to content

Commit

Permalink
Fallback to npm if there are no lockfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Tate-CC committed Sep 12, 2024
1 parent dbde1a6 commit 5f33861
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ssgs/ssg.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,9 @@ export default class Ssg {
if (filePaths.includes(packageJsonPath)) {
const useYarn = filePaths.includes(joinPaths([options.source, 'yarn.lock']));
const usePnpm = filePaths.includes(joinPaths([options.source, 'pnpm-lock.yaml']));
const useNpm = filePaths.includes(joinPaths([options.source, 'package-lock.json']));
const useNpm =
filePaths.includes(joinPaths([options.source, 'package-lock.json'])) ||
(!useYarn && !usePnpm);

if (useNpm) {
commands.install.push({
Expand Down

0 comments on commit 5f33861

Please sign in to comment.