简体   繁体   中英

Whenever I am trying to deploy my react app on gh-pages this error is coming?

Whenever I am trying to deploy my react app on gh-pages this error is coming

Cloning into 'C:\Users\Yasin\Desktop\HTML Projects\igvio-main\node_modules.cache\gh-pages\https.github.com.yasin-ai.igvio.git'::: error: unable to create file src/Media/4VGWsLNGhpXExFXdvAMxJ8Y7WxN-NoHaa0Jf01NNjWEZvR9IbI56c2-VrjIsmgZ0Cugensf-3qJDt3tkSRV-Y2LYGHrcPDJJmLPf9zpqFq94ocq16seQT0queKpLauUjwFKD2e7NZbs2jSDeJz0sx_1wr__psiwBSqkrW9kTiTPoe, Filename too long fatal. unable to checkout working tree warning: Clone succeeded, but checkout failed. You can inspect what was checked out with 'git status' and retry with 'git restore --source=HEAD :/'

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! instagram-tools@0.1.0 deploy: `gh-pages -d build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the instagram-tools@0.1.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\Yasin\AppData\Roaming\npm-cache\_logs\2022-08-17T14_07_49_625Z-debug.log
PS C:\Users\Yasin\Desktop\HTML Projects\igvio-main> git config --system core.longpaths true
error: could not lock config file C:/Program Files/Git/etc/gitconfig: Permission denied

This was due to long file names and doing a simple config as below resolved it

git config --system core.longpaths true

or another solution is try using this

git reset

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM