{"record":{"id":"f2e426dac2aa3e11","repo":"quasarframework/quasar","slug":"invalid-env-prefix-entry-specified-in-the-arr","errorCode":null,"errorMessage":"Invalid env prefix \"${entry}\" specified in the array. Skipping it.","messagePattern":"Invalid env prefix \"(.+?)\" specified in the array\\. Skipping it\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"app-vite/lib/utils/env.js","lineNumber":80,"sourceCode":"        return ''\n      }\n\n      warn(\n        `Invalid env prefix specified, using default \"${defaultPrefix}\" instead.`,\n        banner\n      )\n      return defaultPrefix\n    }\n\n    return prefix\n  }\n\n  const validPrefixList = []\n  for (const entry of prefix) {\n    if (!entry) continue\n\n    if (!validEnvKeyRE.test(entry)) {\n      warn(\n        `Invalid env prefix \"${entry}\" specified in the array. Skipping it.`,\n        banner\n      )\n      continue\n    }\n\n    validPrefixList.push(entry)\n  }\n\n  if (validPrefixList.length === 0) {\n    if (!defaultPrefix) {\n      warn(\n        `No valid env prefix specified in the array. Allowing all env keys that are valid in JS (without any prefix).`,\n        banner\n      )\n      return ''\n    }\n","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/quasarframework/quasar/blob/4841521b5f635a971eb9e2710e5542efd194691b/app-vite/lib/utils/env.js#L62-L98","documentation":"When env.prefix is an array, each entry must itself be a valid JS identifier (validEnvKeyRE), since each will prefix variables exposed as import.meta.env keys. Empty entries are skipped silently; non-empty invalid entries trigger this warning and are skipped from the resulting validPrefixList.","triggerScenarios":"quasar dev/build with env.prefix as an array containing at least one truthy but invalid entry (e.g. ['MYAPP_', 'client-1_']); invoked from the prefix/clientPrefix/backendPrefix getters.","commonSituations":"Mixing kebab-case names into the array, stray values with spaces, or including placeholder strings like '-' meant as separators.","solutions":["Fix or remove the offending entry in the prefix array so all entries match /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.","Drop empty strings too if you want cleaner logs (they are skipped silently).","After fixing, rename .env variables to use one of the valid prefixes."],"exampleFix":"// before (quasar.config)\nenv: { prefix: ['MYAPP_', 'client-1_'] }\n// after\nenv: { prefix: ['MYAPP_', 'CLIENT1_'] }","handlingStrategy":"validation","validationCode":"const validEnvKeyRE = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/\nconst list = conf.env?.prefix\nif (Array.isArray(list)) {\n  const bad = list.filter(e => e && !validEnvKeyRE.test(e))\n  if (bad.length) throw new Error(`Invalid env prefixes: ${bad.join(', ')}`)\n}","typeGuard":"function isValidPrefixArray(v) {\n  return Array.isArray(v) && v.every(e => typeof e === 'string' && /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(e))\n}","tryCatchPattern":null,"preventionTips":["Apply the same identifier rules to every array entry as to a single prefix.","Remove empty placeholder strings from the array.","Keep prefixes uppercase snake-style to avoid accidental invalid characters."],"tags":["env","config","array"],"backgroundTag":"invalid-env-prefix","analyzedSha":"4841521b5f635a971eb9e2710e5542efd194691b","analyzedAt":"2026-08-30T01:13:14.944Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}