由于特殊原因,我想在两个文件夹 web
(React 应用程序)和 mobile
之间共享 package.json 文件:
▸ mobile/
▸ node_modules/
▾ web/
▸ public/
▸ src/
README.md
package-lock.json
package.json
yarn.lock
在我的 package.json 文件中,我已经在 scripts 下添加了以下内容:
"web-start": "react-scripts start"
。但是,当我在根文件夹(/Users/edmund/Documents/src/banana-client
)中运行它时,我得到了以下信息:➜ banana-client git:(master) ✗ yarn web-start
yarn web-start v0.24.6
$ react-scripts start web
Could not find a required file.
Name: index.html
Searched in: /Users/edmund/Documents/src/banana-client/public
error Command failed with exit code 1.
我能添加根目录的方法吗?
ejected create-react-app
吗?react-scripts
是 CRA 的一部分... - Andy Theos