Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Invalid Config File Error Block for React

A full-screen page for a config file that does not validate: a numbered, editable JSON window parsed as you type, the problems located by line and column, and one button that applies the fixes.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Point at the exact line that is wrong, with this invalid config error for React with Base UI. It's a whole screen with the page's rails and one band across it, split with the window first. In the window, wireloom.config.json is a real Textarea in a themed numbered window of 14 lines that scrolls inside itself, and it is parsed as you type: the lines with a problem have a heavy edge, and a broken file reports its syntax problem by line and column in words. At the other side are the headline, the one Shine Button Apply the three fixes, an Undo, and the problems as a list of native radios: choosing one shades its line and scrolls the window to it. A Copy Button copies the text as it stands. The band's rules and the window's frame come from Guides, and the entrance is CSS only. For a deploy CLI, a build tool or any app with a config file.

FAQ

Does it read or write a file, and what is real?

No. The text is local state in the page, and Apply rewrites that text only. The Copy button is real and writes whatever the field holds. To wire it for real, feed the field your file's contents, run your own validator in place of problemsOf, and write the fixed text back yourself.

How does it find the problems?

A small JSON parser in the file reads the text and keeps the line and column of every key and value. If the text is not valid JSON, it reports the first syntax problem, such as a comma before a closing brace, and nothing else. If it is valid, three rules run on it: the server port must be a whole number from 1 to 65535, the deploy section needs a region, and its size is at most 1000 MB, plus a name and the two sections being present. Change the rules in the file to match your schema.

What does Apply the three fixes change?

Only what it can change safely: it puts the sample port 8080 or the sample size 512 over a bad value, and adds a region line to the deploy section. A problem with no automatic fix, such as a missing section or a syntax error, stays in the list, and the button says there are no fixes to apply. Undo puts back the text from before the last Apply. When no problem is left, the headline and its sentence say the config is valid, in the same space, so nothing moves.

What happens when I choose a problem?

Its line is shaded in the window, which scrolls to bring it into view, and the status line says where it is and what is wrong. The radios are a normal group, so the arrow keys move between problems. The list shows the first three and the heading counts the rest.

Does it work in a right-to-left page?

The window stays left to right, as code should, and its gutter and the field scroll together inside one region. The problems list, the headline and the buttons follow the page direction, and each sentence is isolated so its punctuation stays put.

What changes on a phone?

The headline, the button and the problems come first, then the window, which is a little shorter and scrolls inside itself. Nothing makes the page scroll sideways down to 320 px.

  • Pro

    Missing API Key Error

    Developer tools

    A full-screen page for a developer whose API key is missing: the steps to fix it, and a numbered .env window whose empty key line is marked and can be filled with a sample key that shows as a diff.

  • Pro

    A full-screen page for a missing package: the error line in a copy strip, four install tabs with real Copy buttons, the package card and three steps for after installing.

  • Pro

    A CI build window: five pipeline stages as tabs, each with its own numbered log, the failing line marked, a re-run that only queues, common fixes and the build id with Copy.

  • Pro

    A migration ledger after a failed migration: five rows with their states, the database error in a numbered window, a retry that fails again, and a roll-back that says exactly what it reverts.

  • Pro

    Failed Test Run Error

    Developer tools

    A test-runner window: a tree of suites and tests with their results, a Failed only switch, and a pane that compares expected and received values with the differing characters underlined.

  • Pro

    A full-screen page for a rolled-back deploy: a line chart of one metric against its limit with the health check, rollback and recovery pinned to it, and a switch between three metrics.