【发布时间】:2021-05-12 04:45:01
【问题描述】:
我已经创建了我的 cra 自定义模板 https://github.com/iBobo5/cra-template-ld.git,并且我正在尝试使用这个模板和这个命令行来创建一个新的应用程序:
yarn create react-app test-app --template https://github.com/iBobo5/cra-template-ld.git
在安装过程中,此错误会阻止所有:
Cannot find module 'https://github.com/iBobo5/cra-template-ld.git/package.json'
但是你可以很容易地看到 package.json 文件存在。
谁能帮帮我?
谢谢
【问题讨论】:
-
Per create-react-app.dev/docs/custom-templates 似乎只支持在 NPM 上发布或在本地下载的模板,而不是直接指向 git repos 的链接。
-
那么请在下方写下答案。
标签: reactjs templates create-react-app yarnpkg react-scripts