{"record":{"id":"ee4d2008ad1575c4","repo":"quasarframework/quasar","slug":"no-env-prefix-specified-using-default-defaultp","errorCode":null,"errorMessage":"No env prefix specified, using default \"${defaultPrefix}\" instead.","messagePattern":"No env prefix specified, using default \"(.+?)\" instead\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"info","filePath":"app-vite/lib/utils/env.js","lineNumber":48,"sourceCode":"/**\n * Filter out keys that cannot be used in JS\n * as import.meta.env.[key]\n * Examples: ProgramFiles(x86), BASH_FUNC_which%%\n *\n * Also, avoid sub-deps changing process.env, resulting\n * in restarts of the devserver watching for config changes...\n */\nconst processEnv = Object.keys(process.env)\n  .filter(key => validEnvKeyRE.test(key))\n  .reduce((acc, key) => {\n    acc[key] = process.env[key]\n    return acc\n  }, {})\n\nfunction getEnvFilesPrefix({ prefix, defaultPrefix, banner }) {\n  if (!prefix) {\n    if (!defaultPrefix) return ''\n    warn(\n      `No env prefix specified, using default \"${defaultPrefix}\" instead.`,\n      banner\n    )\n    return defaultPrefix\n  }\n\n  if (!Array.isArray(prefix)) {\n    if (!validEnvKeyRE.test(prefix)) {\n      if (!defaultPrefix) {\n        warn(\n          `The \"${prefix}\" env prefix is invalid in JS. Allowing all env keys that are valid in JS (without any prefix).`,\n          banner\n        )\n        return ''\n      }\n\n      warn(\n        `Invalid env prefix specified, using default \"${defaultPrefix}\" instead.`,","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/quasarframework/quasar/blob/4841521b5f635a971eb9e2710e5542efd194691b/app-vite/lib/utils/env.js#L30-L66","documentation":"getEnvFilesPrefix resolves which prefix filters which .env files' variables are exposed. When the configured prefix is falsy (undefined/empty) but the caller supplies a defaultPrefix, it warns and falls back to that default instead of silently exposing nothing.","triggerScenarios":"quasar dev/build when quasar.config > env > prefix is omitted/empty while a default prefix applies (e.g. client builds defaulting to 'QCLI_'); getEnvFilesPrefix is called by the prefix, clientPrefix and backendPrefix getters.","commonSituations":"Upgrading Quasar where env prefix handling changed, deleting the env prefix option while relying on old behavior, or a typo like prefix: '' meaning to disable it.","solutions":["Set quasar.config > env > prefix explicitly (e.g. prefix: 'MY_APP_') to silence the warning and control exposure.","If the default is acceptable, no action needed — it is informational only.","To expose nothing, set prefix to a non-empty unlikely string rather than empty."],"exampleFix":"// before (quasar.config)\nenv: { prefix: undefined }\n// after\nenv: { prefix: 'MYAPP_' }","handlingStrategy":"validation","validationCode":"// in quasar.config\nif (!conf.env?.prefix) console.warn('env.prefix not set; default prefix will be used')","typeGuard":"function hasEnvPrefix(conf) {\n  return typeof conf?.env?.prefix === 'string' && conf.env.prefix.length > 0 || Array.isArray(conf?.env?.prefix)\n}","tryCatchPattern":null,"preventionTips":["Always declare env.prefix explicitly in quasar.config.","Decide team-wide on one prefix convention (uppercase + trailing underscore)."],"tags":["env","config","dotenv"],"backgroundTag":"missing-env-prefix","analyzedSha":"4841521b5f635a971eb9e2710e5542efd194691b","analyzedAt":"2026-08-30T01:13:14.944Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}