npm “下列路径被您的一个.gitignore文件忽略:尝试使用“gh-pages”进行部署时出现node_modules”

bxgwgixi  于 2023-03-03  发布在  Git
关注(0)|答案(1)|浏览(169)

我尝试将我的应用部署到github,但我遇到了这个错误:

$ npm run deploy

> git-repository@1.0.0 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! git-repository@1.0.0 deploy: `gh-pages -d dist`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the git-repository@1.0.0 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

9gm1akwq

9gm1akwq1#

刚刚遇到此错误。我删除了以下文件夹并重新运行命令:
距离
节点模块/. cache
已成功部署应用程序。

相关问题