Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion package/src/common/configure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,22 @@ import {
configureDependency,
kDependencies,
} from "./dependencies/dependencies.ts";
import { suggestUserBinPaths } from "../../../src/core/path.ts";
import { suggestUserBinPaths, which } from "../../../src/core/path.ts";
import { buildQuartoPreviewJs } from "./previewjs.ts";
import { isWindows } from "../../../src/deno_ral/platform.ts";

export async function configure(
config: Configuration,
) {
// npm is required later for building quarto-preview.js (used by `quarto
// preview` live-reload). Check upfront to fail fast before downloading
// hundreds of MB of dependencies when npm is missing.
if ((await which("npm")) === undefined) {
throw new Error(
"npm not found on PATH. Please install Node.js (which provides npm) before running configure.",
);
}

// Download dependencies
for (const dependency of kDependencies) {
const targetDir = join(
Expand Down
Loading