npm error code EJSONPARSE?
aaliyahchoward1
FREEOP

18 days ago

It says:

npm error code EJSONPARSE

npm error path /app/package.json

npm error JSON.parse Unexpected token "\" (0x5C) in JSON at position 1 while parsing near "{\n "name": "via-ai"..."

npm error JSON.parse Failed to parse JSON data.

npm error JSON.parse Note: package.json must be actual JSON, not just JavaScript.

npm error A complete log of this run can be found in: /root/.npm/_logs/2026-09-16T13_59_39_340Z-debug-0.log

Build Failed: build daemon returned an error < failed to solve: process "/bin/sh -c npm install" did not complete successfully: exit code: 1 >

what should i do?

Awaiting Conductor Response$10 Bounty

2 Replies

Railway
BOT

18 days ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway • 18 days ago


I’d check your package.json for any \n characters.

You can also try removing the new line and adding a new line yourself to remove any weird hidden characters.


flyinglap
FREE

17 days ago

To add a validation step: replace literal \n outside quoted strings with actual line breaks, then run:

node -e "JSON.parse(require('node:fs').readFileSync('package.json','utf8')); console.log('Valid JSON')"

Welcome!

Sign in to your Railway account to join the conversation.

Loading...