Having recently started using npm and node, I decided to create a react app with truffle unbox react using npm init react-app. Despite attempting to reinstall npm and clear the cache multiple times, I consistently encounter an error when trying to run sudo npm start.
npm ERR! code EJSONPARSE
npm ERR! file /home/a/Documents/so/client/package.json
npm ERR! JSON.parse Failed to parse json
npm ERR! JSON.parse Unexpected token { in JSON at position 634 while parsing near '...rsion"
npm ERR! JSON.parse ]
npm ERR! JSON.parse }
npm ERR! JSON.parse }
npm ERR! JSON.parse
npm ERR! JSON.parse {
npm ERR! JSON.parse "name": "mapboxAnd...'
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! /home/a/.npm/_logs/2020-06-21T17_39_45_819Z-debug.log
The contents of my package.json are as follows:
{
"name": "client",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "16.11.0",
"react-dom": "16.11.0",
"react-scripts": "3.2.0",
"web3": "1.2.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
I have confirmed that the package.json file strictly adheres to the JSON format. Any insights on resolving this issue would be greatly appreciated. Thank you!