Skip to content

Instantly share code, notes, and snippets.

View danyal2050's full-sized avatar

danyal2050

View GitHub Profile
@danyal2050
danyal2050 / <domain>.conf
Created January 3, 2020 06:01 — forked from pviojo/<domain>.conf
Nginx conf. Wordpress blog in a subdirectory (/blog)
server {
listen 80;
server_name <domain>
server_name_in_redirect off;
access_log logs/<domain>.access.log;
error_log logs/<domain>.error.log;
gzip_static on;
@danyal2050
danyal2050 / debugging-node-elastic-beanstalk-woes
Created January 31, 2021 05:11 — forked from jmar777/debugging-node-elastic-beanstalk-woes
Debugging "Failed to run npm install. Snapshot logs for more details." on Elastic Beanstalk
First, we need to figure out what the actual error is. This is obviously frustrating given that the error message is intentionally truncating it.
1) SSH in to your node (various guides available for this if you're not already familiar with this).
2) Run this command (basically an Elastic Beanstalk wrapper command for npm install I found in a blog post [1]):
$ sudo /opt/elasticbeanstalk/containerfiles/ebnode.py --action npm-install 2
3) Find the actual error message in the output from the npm install.
Once you know the error, it should hopefully be fairly obvious how to fix it. I've run into two different errors over the last couple days on Elastic Beanstalk:
The first was a dependency that was using the new "^X.Y.Z" version syntax, which is only supported in Node >= v0.10.26 (whereas Elastic Beanstalk only supports up to v0.10.21 as of today). The solution here was easy: hardcode a dependency version *prior* to when that dependency adopted to the new syntax.
@danyal2050
danyal2050 / readme.txt
Created January 10, 2022 14:38 — forked from ljayz/readme.txt
Fix aws codecommit unable to access repository (The requested URL returned error: 403) in windows
this was tested using windows10 pro
when cloning a git this error was produced
fatal: unable to access 'https://git-codecommit.us-east-1.amazonaws.com/v1/repos/RepositoryName': The requested URL returned error: 403
to fix add the following git configuration
git config --global credential.helper "!aws codecommit credential-helper $@"
git config --global credential.UseHttpPath true
check if git has system credential.helper by typing