{"record":{"id":"25cf752c4f351f90","repo":"serverless/serverless","slug":"configuration-parse-error","errorCode":"CONFIGURATION_PARSE_ERROR","errorMessage":"Cannot parse \"${path.basename(configurationPath)}\": ${error.message}","messagePattern":"Cannot parse \"(.+?)\": (.+?)","errorType":"exception","errorClass":"ServerlessError","httpStatus":null,"severity":"error","filePath":"packages/serverless/lib/configuration/read.js","lineNumber":52,"sourceCode":"    throw new ServerlessError(\n      `Cannot parse \"${path.basename(configurationPath)}\": ${error.message}`,\n      'CONFIGURATION_NOT_ACCESSIBLE',\n    )\n  }\n}\n\nconst parseConfigurationFile = async (configurationPath) => {\n  switch (path.extname(configurationPath)) {\n    case '.yml':\n    case '.yaml': {\n      const content = await readConfigurationFile(configurationPath)\n      try {\n        return yaml.load(content, {\n          filename: configurationPath,\n          schema: cloudformationSchema,\n        })\n      } catch (error) {\n        throw new ServerlessError(\n          `Cannot parse \"${path.basename(configurationPath)}\": ${\n            error.message\n          }`,\n          'CONFIGURATION_PARSE_ERROR',\n        )\n      }\n    }\n    case '.json': {\n      const content = await readConfigurationFile(configurationPath)\n      try {\n        return JSON.parse(content)\n      } catch (error) {\n        throw new ServerlessError(\n          `Cannot parse \"${path.basename(\n            configurationPath,\n          )}\": JSON parse error: ${error.message}`,\n          'CONFIGURATION_PARSE_ERROR',\n        )","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/serverless/serverless/blob/b9d7ea51c8cce57cff1207964b9b71123673081f/packages/serverless/lib/configuration/read.js#L34-L70","documentation":"Error \"Cannot parse \"${path.basename(configurationPath)}\": ${error.message}\" thrown in serverless/serverless.","triggerScenarios":"Thrown at packages/serverless/lib/configuration/read.js:52 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Address the parse error shown for the configuration file (invalid syntax or unsupported content) and retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b9d7ea51c8cce57cff1207964b9b71123673081f","analyzedAt":"2026-08-13T04:14:40.386Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}