Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: EROFS gh-pages/.cache on yarn-2 - git clone targets .zip file #343

Closed
Adrian-Grimm opened this issue Mar 24, 2020 · 7 comments · Fixed by #362
Closed

Bug: EROFS gh-pages/.cache on yarn-2 - git clone targets .zip file #343

Adrian-Grimm opened this issue Mar 24, 2020 · 7 comments · Fixed by #362

Comments

@Adrian-Grimm
Copy link

Adrian-Grimm commented Mar 24, 2020

I'm using yarn2 to deploy a gatsby page to github.
"gh-pages": "^2.2.0"
node_js is on version 13

Command NODE_DEBUG=gh-pages GH_TOKEN=**** yarn deploy gets following output with an error:

success onPostBuild - 0.174s info Done building in 15.140969228 sec GH-PAGES 15514: Cloning https://TEST@github.com/****************.github.io.git into .yarn/cache/gh-pages-npm-2.2.0-7dddbcd165-2.zip/node_modules/gh-pages/.cache/github.com!****************.github.io.git EROFS: read-only filesystem, mkdir '/node_modules/gh-pages/.cache'
He ties to write into the zip file... don't know why...

@Adrian-Grimm
Copy link
Author

Adrian-Grimm commented Mar 24, 2020

I think the issue is in this method of gh-pages/lib/index.js:

function getCacheDir() { return path.relative(process.cwd(), path.resolve(__dirname, '../.cache')); }

the cache sould be somewhere else.. __dirname is in case of yarn2 a zip file - read_only.

perfect would be an optional "GitSyncTmpDir" folder param where everything goes for the git operations...

@Adrian-Grimm Adrian-Grimm changed the title Bug? EROFS gh-pages/.cache Bug? EROFS gh-pages/.cache on yarn-2 - git clone targets .zip file Mar 25, 2020
@Adrian-Grimm Adrian-Grimm changed the title Bug? EROFS gh-pages/.cache on yarn-2 - git clone targets .zip file Bug: EROFS gh-pages/.cache on yarn-2 - git clone targets .zip file Mar 25, 2020
Adrian-Grimm added a commit to Adrian-Grimm/gh-pages that referenced this issue Mar 25, 2020
Adrian-Grimm added a commit to Adrian-Grimm/gh-pages that referenced this issue Mar 25, 2020
Adrian-Grimm added a commit to Adrian-Grimm/gh-pages that referenced this issue Mar 25, 2020
@s5no5t
Copy link

s5no5t commented May 17, 2020

I have the same issue, and it is blocking my use of gh-pages in a CI pipeline.

@tschaub what would be a proper solution here? A new cache dir param in options, or a different default cache dir in the current dir, as suggested by @Adrian-Grimm ? Would you be interested in a PR?

@tschaub
Copy link
Owner

tschaub commented May 17, 2020

I think it would be preferable to solve this without adding another option.

@s5no5t
Copy link

s5no5t commented May 18, 2020

@tschaub would it make sense to set the default cache dir to .gh-pages (in the project folder)?

@Adrian-Grimm
Copy link
Author

Adrian-Grimm commented May 18, 2020

@jugglingthebits: there is already a pull for my quick fix: #344

Until the official version is fixed you can solve it (hacky) like me: cursorbeat/cursorbeat.github.io@838e6df (.yarn/cache/gh-pages-npm-2.2.0-7dddbcd165-2.zip) - commit the whole modified .zip file and modify the .lock file to the new hash: (checksum: 2/85c5bb5506d1eeade54087d4c90211159533a1291854a9318fdd046e4a8a7a8c26327c7667a31af0c812ffa0d58639ca54c879f7ec062bf1d15ccf02f457ddb8)

After a official patch you can revert this commit.

@Adrian-Grimm
Copy link
Author

Adrian-Grimm commented Jun 10, 2020

@jugglingthebits: there is already a pull for my quick fix: #344

Until the official version is fixed you can solve it (hacky) like me: cursorbeat/cursorbeat.github.io@838e6df (.yarn/cache/gh-pages-npm-2.2.0-7dddbcd165-2.zip) - commit the whole modified .zip file and modify the .lock file to the new hash: (checksum: 2/85c5bb5506d1eeade54087d4c90211159533a1291854a9318fdd046e4a8a7a8c26327c7667a31af0c812ffa0d58639ca54c879f7ec062bf1d15ccf02f457ddb8)

After a official patch you can revert this commit.

Updated hack/workaround for V3 comp. with yarn2 (rc34): cursorbeat/cursorbeat.github.io@7119ef8

pull of this is still open: #344

@tschaub
Copy link
Owner

tschaub commented Jun 20, 2020

Thanks for the report on this. It should be fixed in gh-pages@3.1.0. Please open another issue if things still don't work with yarn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants