我正在尝试将我的应用程序部署到 github,但我遇到了这个错误:
$ npm run deploy
> [email protected] deploy C:\Users\zarin\Desktop\projects\GIT repository
> gh-pages -d dist
The following paths are ignored by one of your .gitignore files:
node_modules
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] deploy: `gh-pages -d dist`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\zarin\AppData\Roaming\npm-cache\_logs\2022-08-28T16_31_01_911Z-debug.log
不太确定在这里如何处理 node_modules
刚遇到这个错误。我删除了以下文件夹并重新运行命令:
距离
node_modules/.cache
成功部署应用程序。