我正在尝试学习 React,并且我正在使用一个私有(private)存储库来开始它。
我在存储库目录中运行yarn start
,但收到错误消息:
yarn run v1.13.0
error Command "start" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
我安装了节点和 yarn 。
对于节点:
v10.15.0
node is /usr/local/bin/node
对于 yarn :
1.13.0
yarn is /usr/local/bin/yarn
我尝试重新安装节点和 yarn ,但收到相同的错误消息。此外,我尝试通过yarn cache clean
删除 yarn 机会,但似乎没有任何作用。
package.json
包含以下内容:
{
"name": "02-Manipulating-Strings",
"version": "1.0.0",
"author": "ssaunier",
"license": "UNLICENSED",
"private": true,
"devDependencies": {
"eslint": "^4.7.2",
"eslint-config-airbnb-base": "^12.0.0",
"eslint-plugin-import": "^2.7.0",
"jest": "^21.1.0"
},
"scripts": {
"test": "(eslint lib || true) && jest"
}
}
目录按以下方式组织:
最佳答案
package.json 文件的脚本中没有 start
命令。
"scripts": {
"start": "some command to be run", // you need to add this line
"test": "(eslint lib || true) && jest"
}
也许您想改为运行 test
命令 - npm test
/yarn test
?
关于reactjs - 错误: yarn start - error Command "start" not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54393192/