1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
Hello,
The problem is caused by the change in npm version; there was a breaking change between npm v6 (Node.js 14) and npm v8 (Node.js 16) relating to filesystem permissions.
Solution:
- Create the following Platform Hooks paths in the root directory of your application bundle.
- .platform/hooks/prebuild
- .platform/confighooks/prebuild
- Create the following bash script (00_npm_install.sh) with execute permissions (chmod +x).
#!/bin/bash cd /var/app/staging sudo -u webapp npm install sharp
- Validate the Application Bundle Structure.
Example Sample project structure:
~/my-app/
├── app.js
├── index.html
├── .npmrc_bkp
├── package.json
├── package-lock.json
├── .platform
│ ├── confighooks
│ │ └── prebuild
│ │ └── 00_npm_install.sh
│ └── hooks
│ └── prebuild
│ └── 00_npm_install.sh
└── Procfile
- Deploy the Application!
This solution is explained in more details on this post https://github.com/lovell/sharp/issues/3221#issuecomment-1126528844
Contenus pertinents
- demandé il y a 3 mois
- demandé il y a un an
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans