Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

253
Views
AWS Beanstalk -> "unsafe-perm=true" in .npmrc file for AWS Beanstalk not working

Hi there I am using AWS Beanstalk to deploy my Express app for the first time right and when I try to upload my Express app I get an error saying this:

[ERROR] An error occurred during execution of command [app-deploy] - [Use NPM to install dependencies]. Stop running the command. Error: Command /bin/sh -c npm --production install failed with error exit status 1. Stderr:npm ERR! code 1
    npm ERR! path /var/app/staging/node_modules/sharp
    npm ERR! command failed
    npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
    npm ERR! sharp: Are you trying to install as a root or sudo user? Try again with the --unsafe-perm flag
    npm ERR! sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
    npm ERR! sharp: Installation error: EACCES: permission denied, mkdir '/root/.npm'

I know that the solution was to add .npmrc with code unsafe-perm=true but this didnt fix the issue. It seems that the issue is on the user that is use to perform the installation of dependencies and node-gyp may need root privilegies.

Any idea how to achieve this? It failes as soon as it tries to install the 'sharp' library

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!