Created
March 12, 2024 17:35
-
-
Save mgmgpyaesonewin/30d9f825bcb73b060a6d243ec80b8a2b to your computer and use it in GitHub Desktop.
sudo chown -R $USER /var/www/crawler/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ubuntu@ip-172-31-32-251:/var/www/crawler$ npm install | |
npm ERR! code EACCES | |
npm ERR! syscall mkdir | |
npm ERR! path /var/www/crawler/node_modules | |
npm ERR! errno -13 | |
npm ERR! Error: EACCES: permission denied, mkdir '/var/www/crawler/node_modules' | |
npm ERR! [Error: EACCES: permission denied, mkdir '/var/www/crawler/node_modules'] { | |
npm ERR! errno: -13, | |
npm ERR! code: 'EACCES', | |
npm ERR! syscall: 'mkdir', | |
npm ERR! path: '/var/www/crawler/node_modules' | |
npm ERR! } | |
npm ERR! | |
npm ERR! The operation was rejected by your operating system. | |
npm ERR! It is likely you do not have the permissions to access this file as the current user | |
npm ERR! | |
npm ERR! If you believe this might be a permissions issue, please double-check the | |
npm ERR! permissions of the file and its containing directories, or try running | |
npm ERR! the command again as root/Administrator. | |
npm ERR! A complete log of this run can be found in: /home/ubuntu/.npm/_logs/2024-03-12T17_23_26_238Z-debug-0.log | |
ubuntu@ip-172-31-32-251:/var/www/crawler$ sudo chown -R $USER /var/www/crawler/ | |
ubuntu@ip-172-31-32-251:/var/www/crawler$ npm install |
server {
server_name crawler.bethesdamedical.co;
charset utf-8;
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_log /var/log/nginx/error.log;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
sudo chown -R www-data.www-data /var/www/api/storage
sudo chown -R www-data.www-data /var/www/travellist/bootstrap/cache
sudo chown -R $USER /var/www/api
346 sudo nginx -t
347 sudo systemctl restart nginx
348 sudo systemctl status nginx
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pm2 start npm --name crawler -- run start -- -p 3000