-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
Make web push & imgproxy setup optional for local dev #373
Conversation
f243319
to
9466833
Compare
I think your PR is messed up, it's got 16k lines changed! |
It was based on a branch for upgrades which was merged into master since. We wanted to avoid merge conflicts since there were a lot of changes in the upgrades branch (as you can see). But seems like the commit hashes changed since I assumed the changes would just disappear here after the merge. |
9466833
to
6502022
Compare
Apologies if this isn't the right place for this issue, but I'm running into some errors after running docker-compose up --build after this pull request had been merged:
Any idea what's going on here? Thanks. |
This error means the user running the next dev command does not own the .git folder afaik. It's strange that this happened after that commit because it shouldn't have an affect on something like this. I'll try to reproduce locally. |
So this started up without problem for me. I'd guess there's something weird going on with the permissions of your working directory (the one you cloned into, The permissions of my folders are: If you just want to cure the symptom, you can set |
I get the same error since SN includes the version in the footer. So this shouldn't be new afaict. I worked around this a while ago with this is patch: diff --git a/next.config.js b/next.config.js
index 35c80cf..e4c28d6 100644
--- a/next.config.js
+++ b/next.config.js
@@ -15,13 +15,13 @@ const corsHeaders = [
]
// XXX this fragile ... eb could change the version label ... but it works for now
-const commitHash = isProd
- ? Object.keys(require('/opt/elasticbeanstalk/deployment/app_version_manifest.json').RuntimeSources['stacker.news'])[0].match(/^app-(.+)-/)[1] // eslint-disable-line
- : require('child_process').execSync('git rev-parse HEAD').toString().slice(0, 4)
+// const commitHash = isProd
+// ? Object.keys(require('/opt/elasticbeanstalk/deployment/app_version_manifest.json').RuntimeSources['stacker.news'])[0].match(/^app-(.+)-/)[1] // eslint-disable-line
+// : require('child_process').execSync('git rev-parse HEAD').toString().slice(0, 4)
module.exports = withPlausibleProxy()({
env: {
- NEXT_PUBLIC_COMMIT_HASH: commitHash,
+ // NEXT_PUBLIC_COMMIT_HASH: commitHash,
NEXT_PUBLIC_LND_CONNECT_ADDRESS: process.env.LND_CONNECT_ADDRESS,
NEXT_PUBLIC_ASSET_PREFIX: isProd ? 'https://a.stacker.news' : ''
},
@@ -30,7 +30,7 @@ module.exports = withPlausibleProxy()({
scrollRestoration: true
},
reactStrictMode: true,
- generateBuildId: isProd ? async () => commitHash : undefined,
+ // generateBuildId: isProd ? async () => commitHash : undefined,
// Use the CDN in production and localhost for development.
assetPrefix: isProd ? 'https://a.stacker.news' : undefined,
crossOrigin: isProd ? 'anonymous' : undefined, I have been running this patch for so long, I totally forgot this is an issue, lol. We should find a better solution to this, especially now where more people start contributing. edit: Just setting |
I'm not sure why this happens for you all though. What are your perms ek? |
Everything in the cloned repository is owned by me, However, I think this is unrelated to our file permissions. As mentioned here, since CVE-2022-24765,
This means it now checks that the source folder inside the container is owned by the same user as the parent folder. But this is not the case, the source folder is owned by me but I also got used to my edit: Or it's because the files inside |
Probably the parent of .git. I must be on an older version of git where this check doesn't happen. |
I just pushed a change that catches this git error if it happens. You shouldn't need to monkey patch around this anymore. |
Awesome thanks a ton! Will try it again soon |
Close #357