问题原因
npm install安装的是package-lock.json中的指定版本,而不是package.json中适配你本地环境的版本。
解决方案
(1)第一步
npm cache clean --force
(2)第二步 删除node_modules文件夹
linux上:rm -rf node_modules
window上: 直接手动删除
(3)如果有package-lock.json文件就删除它,没有不用管,直接跳到第(4)步
linux上:rm -rf package-lock.json
window上: 直接手动删除
(4)安装模块
npm install
npm install 成功之后再次启动 npm start