【发布时间】:2020-02-05 16:54:02
【问题描述】:
我正在将我的应用程序部署到 github 页面,但是当我运行命令 npm run deploy 时出现错误
npm ERR! missing script: deploy
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\whoami\AppData\Roaming\npm-cache\_logs\2020-02-05T16_46_06_946Z-debug.log
我在 package.json 文件中定义了部署
...
"scripts": {
"test": "jest --watchAll --verbose --coverage --runInBand",
"start": "node index.js",
"predeploy":"npm run build",
"deploy":"gh-pages -d build"
}
...
【问题讨论】:
-
您确定在正确的目录中运行该命令吗?
-
哦,是的,这是个问题,谢谢:d
标签: node.js reactjs npm github-pages package.json