Я создаю приложение React. Я установил yargs и argsert вручную npm. По какой-то причине, когда я запускаю сервер разработки, я получаю следующую ошибку и трассировку стека. Два указанных модуля четко обозначены как argsert и yargs. Я не уверен, как поступить. Будем благодарны за любые отзывы.
webpack-dev-server --mode development
module.js:549
throw err;
^
Error: Cannot find module './lib/argsert'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/josh/devel/react-app/frontend/node_modules/webpack-dev-server/node_modules/yargs/yargs.js:2:17)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
package. json
{
"name": "react-app",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "webpack-dev-server --mode development",
"build": "webpack --mode production",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/core": "^7.8.7",
"@babel/preset-env": "^7.8.7",
"@babel/preset-react": "^7.8.3",
"babel-loader": "^8.0.6",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^3.2.0",
"webpack": "^4.42.0",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.10.3"
},
"dependencies": {
"argsert": "^1.0.9",
"babel-loader": "^8.0.6",
"react": "^16.13.0",
"react-dom": "^16.13.0",
"react-router-dom": "^5.1.2",
"weak-key": "^1.0.1",
"yargs": "^15.3.1"
}
}