© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•16mo ago•
5 replies
pegos

Cryptic Vite Errors

Problem

Running the command
vite
vite
or
bun run dev
bun run dev
does not work properly and results in the following error.

Error

error when starting dev server:
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at resolveDevelopmentEnvironmentTld (file:///home/pegos/Work/sites/epi-doorman/node_modules/laravel-vite-plugin/dist/index.js:360:23)
    at resolveDevelopmentEnvironmentServerConfig (file:///home/pegos/Work/sites/epi-doorman/node_modules/laravel-vite-plugin/dist/index.js:320:94)
    at config (file:///home/pegos/Work/sites/epi-doorman/node_modules/laravel-vite-plugin/dist/index.js:39:50)
    at runConfigHook (file:///home/pegos/.bun/install/global/node_modules/vite/dist/node/chunks/dep-BWSbWtLw.js:66720:25)
    at async resolveConfig (file:///home/pegos/.bun/install/global/node_modules/vite/dist/node/chunks/dep-BWSbWtLw.js:66169:12)
    at async _createServer (file:///home/pegos/.bun/install/global/node_modules/vite/dist/node/chunks/dep-BWSbWtLw.js:62758:18)
    at async CAC.<anonymous> (file:///home/pegos/.bun/install/global/node_modules/vite/dist/node/cli.js:735:20)
error when starting dev server:
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at resolveDevelopmentEnvironmentTld (file:///home/pegos/Work/sites/epi-doorman/node_modules/laravel-vite-plugin/dist/index.js:360:23)
    at resolveDevelopmentEnvironmentServerConfig (file:///home/pegos/Work/sites/epi-doorman/node_modules/laravel-vite-plugin/dist/index.js:320:94)
    at config (file:///home/pegos/Work/sites/epi-doorman/node_modules/laravel-vite-plugin/dist/index.js:39:50)
    at runConfigHook (file:///home/pegos/.bun/install/global/node_modules/vite/dist/node/chunks/dep-BWSbWtLw.js:66720:25)
    at async resolveConfig (file:///home/pegos/.bun/install/global/node_modules/vite/dist/node/chunks/dep-BWSbWtLw.js:66169:12)
    at async _createServer (file:///home/pegos/.bun/install/global/node_modules/vite/dist/node/chunks/dep-BWSbWtLw.js:62758:18)
    at async CAC.<anonymous> (file:///home/pegos/.bun/install/global/node_modules/vite/dist/node/cli.js:735:20)


What I've tried so far

1. Replace
bun
bun
with
npm
npm
or
pnpm
pnpm

2. Clearing cache
3. Making a fresh project with just Laravel
4. Checking for possible json syntax errors on the whole folder, everything returns a
Syntax OK
Syntax OK

5. Restoring a backup of my computer to a previous week, in case anything changed on the background and it broke node.
6. Changing node versions (latest, latest LTS, and 21.1.0)
Solution
Fix was making a symbolic link

sudo ln -s  ~/.valet/ ~/.config/
sudo ln -s  ~/.valet/ ~/.config/
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Vite configuration
FilamentFFilament / ❓┊help
15mo ago
Vite error
FilamentFFilament / ❓┊help
2y ago
Minimal Theme vite error
FilamentFFilament / ❓┊help
7mo ago
show changes with vite
FilamentFFilament / ❓┊help
3y ago