Describe the bug
When a blueprint JSON file contains invalid syntax or is malformed, Scaffinity currently surfaces the raw JSON.parse error.
While technically correct, the message isn't very user-friendly and doesn't clearly indicate which blueprint caused the issue or provide guidance for fixing it.
Blueprint or command used
{
"name": "example",
"files": [
{
"path": "README.md",
"content": "Hello"
}
] // missing closing brace
scaffinity generate blueprint.json
Expected behavior
Scaffinity should catch JSON parsing errors and display a clearer, more actionable error message.
For example:
- The blueprint file that failed to parse.
- The approximate line/column where parsing failed.
- A suggestion to validate the JSON syntax before retrying.
Actual behavior
The CLI prints the raw JSON.parse error, which may be difficult for beginners to understand.
Environment
- Scaffinity version:
scaffinity -v
- Node version:
node -v
- OS:
- Package manager: npm / pnpm / yarn
Additional context
Improving this error message would make the CLI more beginner-friendly and provide a better developer experience when authoring custom blueprints.
Describe the bug
When a blueprint JSON file contains invalid syntax or is malformed, Scaffinity currently surfaces the raw
JSON.parseerror.While technically correct, the message isn't very user-friendly and doesn't clearly indicate which blueprint caused the issue or provide guidance for fixing it.
Blueprint or command used
{ "name": "example", "files": [ { "path": "README.md", "content": "Hello" } ] // missing closing braceExpected behavior
Scaffinity should catch JSON parsing errors and display a clearer, more actionable error message.
For example:
Actual behavior
The CLI prints the raw
JSON.parseerror, which may be difficult for beginners to understand.Environment
scaffinity -vnode -vAdditional context
Improving this error message would make the CLI more beginner-friendly and provide a better developer experience when authoring custom blueprints.