Здравствуйте, выполнил команду create-react-app my-app + npm start.
Открылся сайт в localhost:3000
закрыл вкладку с этой страницей
запустил другой app через npm start
спросило что 3000 порт занят
решил закрыть его
гугл дал такой вариант
{
"name": "alga-react",
"version": "0.1.0",
"private": true,
"dependencies": {
"jquery": "^3.3.1",
"react": "^16.7.0",
"react-dom": "^16.7.0",
"react-html-id": "^0.1.5",
"react-html-parser": "^2.0.2",
"react-router-dom": "^4.3.1",
"react-scripts": "2.1.3",
"react-slick": "^0.23.2",
"slick-carousel": "^1.8.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"stop": "taskkill -F -IM node.exe"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}
"stop": "taskkill -F -IM node.exe"
выполнил команду npm stop
теперь не могу установить компоненты через npm install nameOfComponent
вот лог ошибки:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'jquery' ]
2 info using npm@6.4.1
3 info using node@v10.15.1
4 verbose npm-session 8907af06ae674f82
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 timing stage:rollbackFailedOptional Completed in 2ms
8 timing stage:runTopLevelLifecycles Completed in 2712ms
9 verbose stack Error: Failed to parse json
9 verbose stack Unexpected token } in JSON at position 404 while parsing near '...t-scripts eject",
9 verbose stack },
9 verbose stack "eslintConfig":...'
9 verbose stack at parseError (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:452:11)
9 verbose stack at parseJson (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:104:26)
9 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:51:5
9 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:78:16
9 verbose stack at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
10 verbose cwd D:\Вёрстка\React\alga-react-1.0.1
11 verbose Windows_NT 6.1.7601
12 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "jquery"
13 verbose node v10.15.1
14 verbose npm v6.4.1
15 error file D:\Вёрстка\React\alga-react-1.0.1\package.json
16 error code EJSONPARSE
17 error JSON.parse Failed to parse json
17 error JSON.parse Unexpected token } in JSON at position 404 while parsing near '...t-scripts eject",
17 error JSON.parse },
17 error JSON.parse "eslintConfig":...'
18 error JSON.parse Failed to parse package.json data.
18 error JSON.parse package.json must be actual JSON, not just JavaScript.
19 verbose exit [ 1, true ]
Как пофиксить?