Error reading package.json as JSON

Hello I keep getting this error
==============
Using Nixpacks
==============

context: abf83e94d72946be98c798215c324d6b
Nixpacks build failed

Error: Error reading package.json as JSON

Caused by:
invalid type: sequence, expected a map at line 6 column 13
==============
Using Nixpacks
==============

context: abf83e94d72946be98c798215c324d6b
Nixpacks build failed

Error: Error reading package.json as JSON

Caused by:
invalid type: sequence, expected a map at line 6 column 13
Solution:
that is indeed an invalid package.json
Jump to solution
4 Replies
Percy
Percy16mo ago
Project ID: c6eed92b-35df-4f7e-8e69-faf8b25d7688
X_DigitalNinja
X_DigitalNinjaOP16mo ago
c6eed92b-35df-4f7e-8e69-faf8b25d7688 This is my project file
{
"name": "Universal",
"version": "1.50",
"description": "",
"main": "src/index.js",
"scripts": [],
"author": "Jordan",
"license": "ISC",
"dependencies": {
"chalk": "^4.1.0",
"discord-giveaways": "^6.0.1",
"discord.js": "^14.11.0",
"dotenv": "^16.3.1",
"mongoose": "^6.11.4"
},
"nodeVersion": "20.0.0"
}
{
"name": "Universal",
"version": "1.50",
"description": "",
"main": "src/index.js",
"scripts": [],
"author": "Jordan",
"license": "ISC",
"dependencies": {
"chalk": "^4.1.0",
"discord-giveaways": "^6.0.1",
"discord.js": "^14.11.0",
"dotenv": "^16.3.1",
"mongoose": "^6.11.4"
},
"nodeVersion": "20.0.0"
}
Solution
Brody
Brody16mo ago
that is indeed an invalid package.json
Brody
Brody16mo ago
scripts is supposed to be an object, not an array and it should be engines.node = 20 not nodeVersion although railway only supports up to node 18
Want results from more Discord servers?
Add your server