diff --git a/bids-validator/src/setup/loadSchema.ts b/bids-validator/src/setup/loadSchema.ts index 2452cb7f0..c8402d138 100644 --- a/bids-validator/src/setup/loadSchema.ts +++ b/bids-validator/src/setup/loadSchema.ts @@ -10,7 +10,7 @@ import * as schemaDefault from 'https://bids-specification.readthedocs.io/en/lat export async function loadSchema(version = 'latest'): Promise { const versionRegex = /^v\d/ let schemaUrl = version - const bidsSchema = Deno.env.get('BIDS_SCHEMA') + const bidsSchema = typeof Deno !== 'undefined' && Deno.env.get('BIDS_SCHEMA') if (bidsSchema !== undefined) { schemaUrl = bidsSchema } else if (version === 'latest' || versionRegex.test(version)) {