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" } }
looks like you are missing comma , between your tasks in scripts
,
scripts
First Thanks for detailed articles, its really helpful. Second thanks for quick response =) I will check it.
thanks, happy to hear that :)
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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"
}
}
looks like you are missing comma
,
between your tasks inscripts
First Thanks for detailed articles, its really helpful.
Second thanks for quick response =)
I will check it.
thanks, happy to hear that :)