我目前正在关注有关如何设置和使用toastify的教程,并且已经对教程进行了深入研究,以至于教程中的人将yarn start
输入到终端,并且他的代码输出在浏览器中打开。但是当我这样做时,终端输出以下内容:yarn run v1.22.4warning package.json: No license fielderror Command "start" not found.info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
,什么也没有发生。我完全按照本教程进行操作,本教程中的人对packag.json没有任何作用,并且他的代码仍然有效。为什么我的代码不起作用?以及如何解决?
最佳答案
您应该在package.json中定义一个启动脚本
例如:
{
"scripts": {
"start": "You should write your start script here"
}
}
关于javascript - 我要在package.json文件中放入什么才能使“ yarn 开始”工作?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/61525416/