Skip to content
npm error code EJSONPARSE?
aaliyahchoward1
OP

2 months 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?

Solved$10 Bounty

Pinned Solution

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.

2 Replies

Railway
BOT

2 months ago

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

Status changed to Open Railway • 2 months 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

2 months 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')"

Status changed to Open 0x5b62656e5d • 5 days ago


Status changed to Solved 0x5b62656e5d • 5 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...