DEV Community

Discussion on: Learn Docker - from the beginning, part II volumes

Collapse
 
amirdamirov profile image
amirdamirov

Hi,

I added new lines to package.json but when i try to build image it givem me next errors:

npm ERR! code EJSONPARSE
npm ERR! file /app/package.json
npm ERR! JSON.parse Failed to parse json
npm ERR! JSON.parse Unexpected string in JSON at position 162 while parsing '{
npm ERR! JSON.parse "name": "node",
npm ERR! JSON.parse "version": "1.0.0"'
npm ERR! JSON.parse Failed to parse package.json data.
npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-09-11T07_41_58_281Z-debug.log

This my package.json file :

{
"name": "node",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"start": "nodemon app.js"
"log": "echo \"Logging something to screen\""
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"express": "4.17.1"
},
"devDependencies": {
"nodemon": "1.19.2"
}
}

Collapse
 
softchris profile image
Chris Noring

looks like you are missing comma , between your tasks in scripts

Collapse
 
amirdamirov profile image
amirdamirov

First Thanks for detailed articles, its really helpful.
Second thanks for quick response =)
I will check it.

Thread Thread
 
softchris profile image
Chris Noring

thanks, happy to hear that :)