'yarn start' 在本地工作并且在 DO Droplet 上出错:没有这样的文件或目录:'start'

问题描述

我有一个本地运行的 React 应用程序,我使用 yarn start 从 git repo 运行它。这成功启动,我可以从控制台选项卡的标题中看到 ~/.yarn/bin/yarn.js start 正在运行。

但是,如果我在我的服务器上尝试此操作,则会收到以下错误

root@ubuntu-web:~/eg-web# yarn start
00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'start'

看看我的 package.json,一个“开始”脚本。

  "scripts": {
    "start": "react-scripts start","build": "react-scripts build","test": "react-scripts test","eject": "react-scripts eject"
  },

在我得到的服务器上仅尝试 yarn

root@ubuntu-web:~/eg-web# yarn
00h00m00s 0/0: : ERROR: There are no scenarios; must have at least one.

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)