问题描述
尝试运行npm start
或npm test
。
解决方法
我正在尝试开发一个springboot/react应用程序,并且已经安装了react并创建了react项目。但是,当我尝试执行以下命令时:
npm run
我得到以下错误:
Lifecycle scripts included in project:
test
echo "Error: no test specified" && exit 1
我还安装了jest,当我转到package.json时:我已经将测试更改为"jest“
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "jest",
"eject": "react-scripts eject"
}
当它仅仅是"react-scripts test“时,我也尝试了,这给了我同样的错误。任何帮助都将非常感谢,谢谢。