I am getting an error for the following package.json file.
If you already have a default version of it. I would be appreciated.
Thanks.
D:\Dev\survey-reactjs>npm run start
npm ERR! code EJSONPARSE
npm ERR! file D:\Dev\survey-reactjs\package.json
npm ERR! JSON.parse Failed to parse json
npm ERR! JSON.parse Unexpected string in JSON at position 288 while parsing '{
npm ERR! JSON.parse "name": "survey-reactjs",
npm ERR! JSON.parse "version'
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! C:\Users\Asus\AppData\Roaming\npm-cache\_logs\2020-07-16T23_48_39_175Z-debug.log
The updated version is below:
Edit:
D:\Dev\survey-reactjs>npm run start
> survey-reactjs@0.1.0 start D:\Dev\survey-reactjs
> node server.js
internal/modules/cjs/loader.js:969
throw err;
^
Error: Cannot find module 'D:\Dev\survey-reactjs\server.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
at Function.Module._load (internal/modules/cjs/loader.js:842:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! survey-reactjs@0.1.0 start: `node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the survey-reactjs@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Asus\AppData\Roaming\npm-cache\_logs\2020-07-17T00_26_04_833Z-debug.log
Package.json file
{
"name": "survey-reactjs",
"version": "0.0.2",
"description": "",
"main": "''",
"scripts": {
"build": "NODE_ENV=production webpack -p --config webpack.production.config.js --progress --profile --colors",
"dev": "webpack-dev-server --progress --profile --colors --hot"
"start": "node ./scripts/start.js",
},
"dependencies": {
"json-loader": "^0.5.4",
"json5-loader": "^0.6.0",
"jsx-loader": "^0.13.2",
"node-libs-browser": "1.0.0",
"react": "15.0.1",
"react-dom": "15.0.1"
}
}
The updated version is below.
Edit :
{
"name": "survey-reactjs",
"scripts": {
"start": "node server.js"
},
"version": "0.1.0",
"private": true,
"dependencies": {
"cra-template": "1.0.3",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-scripts": "3.4.1"
}
}
I have installed over the scratch but gets different error this time.