Skip to content
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

Strapi upgrade with npm install is failing at Sharp download with local issuer certificate #3972

Closed
7 tasks
kavitha237 opened this issue Jan 30, 2024 · 3 comments

Comments

@kavitha237
Copy link

Possible install-time or require-time problem

You must confirm both of these before continuing.

Are you using the latest version of sharp?

  • [X ] I am using the latest version of sharp as reported by npm view sharp dist-tags.latest.

If you cannot confirm this, please upgrade to the latest version and try again before opening an issue.

If you are using another package which depends on a version of sharp that is not the latest,
please open an issue against that package instead.

Are you using a supported runtime?

  • [X ] I am using Node.js with a version that satisfies ^18.17.0 || ^20.3.0 || >=21.0.0
  • I am using Deno
  • I am using Bun

If you cannot confirm any of these,
please upgrade to the latest version
and try again before opening an issue.

Are you using a supported package manager and installing optional dependencies?

  • [X ] I am using npm >= 9.6.5 with --include=optional
  • I am using yarn >= 3.2.0
  • I am using pnpm >= 7.1.0 with --no-optional=false
  • I am using Deno
  • I am using Bun

If you cannot confirm any of these, please upgrade to the latest version of your chosen package manager
and ensure you are allowing the installation of optional or multi-platform dependencies before opening an issue.

What is the complete error message, including the full stack trace?

$ npm install --force --unsafe-perm
npm WARN using --force Recommended protections disabled.
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated mailcomposer@3.12.0: This project is unmaintained
npm WARN deprecated @koa/router@10.1.1: IMPORTANT 10x+ PERFORMANCE UPGRADE: Please upgrade to v12.0.1+ as we have fixed an issue with debuglog causing 10x slower router benchmark performance, see koajs/router#173
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
npm WARN deprecated buildmail@3.10.0: This project is unmaintained
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'C:\inetpub\wwwroot\customerportalcontent\node_modules\@strapi\strapi',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\inetpub\wwwroot\customerportalcontent\node_modules@strapi\strapi\node_modules@strapi\helper-plugin'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\inetpub\wwwroot\customerportalcontent\node_modules\@strapi\strapi\node_modules\@strapi\helper-plugin'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'C:\inetpub\wwwroot\customerportalcontent\node_modules\@strapi\generators',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\inetpub\wwwroot\customerportalcontent\node_modules@strapi\generators\node_modules@strapi\utils'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\inetpub\wwwroot\customerportalcontent\node_modules\@strapi\generators\node_modules\@strapi\utils'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'C:\inetpub\wwwroot\customerportalcontent\node_modules\@strapi\strapi\node_modules',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\inetpub\wwwroot\customerportalcontent\node_modules@strapi\strapi\node_modules@strapi\admin\admin\src\pages\SettingsPage\pages\Roles\ListPage\components'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\inetpub\wwwroot\customerportalcontent\node_modules\@strapi\strapi\node_modules\@strapi\admin\admin\src\pages\SettingsPage\pages\Roles\ListPage\components'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'C:\inetpub\wwwroot\customerportalcontent\node_modules\@strapi\strapi',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\inetpub\wwwroot\customerportalcontent\node_modules@strapi\strapi\node_modules@strapi\admin\admin\src\pages\SettingsPage\pages\Users\utils'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\inetpub\wwwroot\customerportalcontent\node_modules\@strapi\strapi\node_modules\@strapi\admin\admin\src\pages\SettingsPage\pages\Users\utils'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'C:\inetpub\wwwroot\customerportalcontent\node_modules\@strapi\strapi\node_modules\@strapi\admin',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\inetpub\wwwroot\customerportalcontent\node_modules@strapi\strapi\node_modules@strapi\admin\admin\src\pages\SettingsPage\pages\Roles\EditPage\components\PluginsAndSettings'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\inetpub\wwwroot\customerportalcontent\node_modules\@strapi\strapi\node_modules\@strapi\admin\admin\src\pages\SettingsPage\pages\Roles\EditPage\components\PluginsAndSettings'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\inetpub\wwwroot\customerportalcontent\node_modules@strapi\plugin-upload\node_modules\sharp
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
npm ERR! sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.14.2/libvips-8.14.2-win32-x64.tar.br
npm ERR! sharp: Via proxy http:://proxy.oneok.com:8080 with credentials
npm ERR! sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
npm ERR! sharp: Installation error: unable to get local issuer certificate

npm ERR! A complete log of this run can be found in: C:\Users\cad18251\AppData\Local\npm-cache_logs\2024-01-30T00_45_11_365Z-debug-0.log

npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
npm ERR! sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.14.2/libvips-8.14.2-win32-x64.tar.br
npm ERR! sharp: Via proxy http:://proxy.oneok.com:8080 with credentials
npm ERR! sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
npm ERR! sharp: Installation error: unable to get local issuer certificate

What is the complete output of running npm install --verbose --foreground-scripts sharp in an empty directory?

What is the output of running npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp?

@lovell
Copy link
Owner

lovell commented Jan 30, 2024

Hi, did you see this part of the issue template?

If you are using another package which depends on a version of sharp that is not the latest,
please open an issue against that package instead.

Your question relates to strapi, so please see strapi/strapi#19311

@lovell lovell closed this as completed Jan 30, 2024
@kavitha237
Copy link
Author

kavitha237 commented Jan 30, 2024

To the question: If you are using another package which depends on a version of sharp that is not the latest,
please open an issue against that package instead.
Answer: There are no other dependent packages are being used / tried to install

@lovell
Copy link
Owner

lovell commented Jan 31, 2024

It looks like you are using @strapi/plugin-upload, the latest version of which depends on sharp v0.32.6.

$ npm show @strapi/plugin-upload --json | grep sharp
    "sharp": "0.32.6",

The latest version of sharp is v0.33.2.

$ npm show sharp | grep latest
latest: 0.33.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants