Я пытаюсь создать приложения activjs, и каждый раз, когда я устанавливаю activ-router-dom, веб-приложение выдает ошибку в терминале при запуске npm.
Вот ошибка
sh: 1: react-scripts: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! routeroute@0.1.0 start: `react-scripts start`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the routeroute@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! /home/rock/.npm/_logs/2019-03-16T10_04_47_549Z-debug.log
Я попытался выполнить rm -rf node_modules, а затем снова установить, но, похоже, он не работает.Когда я снова установил npm, я получил эту ошибку
npm ERR! path /home/rock/Desktop/routeroute/node_modules/browserslist/cli.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/home/rock/Desktop/routeroute/node_modules/browserslist/cli.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/rock/.npm/_logs/2019-03-16T10_19_02_250Z-debug.log
Вот зависимости для package.json
{
"name": "routeroute",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^16.8.4",
"react-dom": "^16.8.4",
"react-router-dom": "^4.4.0",
"react-scripts": "2.1.8"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}