lovell / sharp

High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.
https://sharp.pixelplumbing.com
Apache License 2.0
29.22k stars 1.29k forks source link

It's not possible to install sharp #2942

Closed thef0under closed 3 years ago

thef0under commented 3 years ago

I used sharp for about a year on another app, no problems at all for that period. Now I am trying to install it on another app, through npm, and it is just not possible. I tried upgrading my npm, I tried using both --unsafe-perm and --ignore-scripts, I tried deleting the npm_modules and package.json, to then run npm install... It just doesn't work! I even tried adding "minipass": "2.7.0" on dependencies, nothing is fixing the issue.

I've seen the same issue popping up from 2019

ERROR: sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.11.3/libvips-8.11.3-linux-x64.tar.br remote: sh: 1: prebuild-install: Permission denied remote: make: Entering directory '/tmp/build_e87a24ec/node_modules/sharp/build' remote: CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o remote: AR(target) Release/obj.target/../node-addon-api/nothing.a remote: COPY Release/nothing.a remote: TOUCH Release/obj.target/libvips-cpp.stamp remote: CXX(target) Release/obj.target/sharp-linux-x64/src/common.o remote: ../src/common.cc:24:10: fatal error: vips/vips8: No such file or directory remote: #include <vips/vips8> remote: ^~~~~~~~~~~~ remote: compilation terminated. remote: sharp-linux-x64.target.mk:139: recipe for target 'Release/obj.target/sharp-linux-x64/src/common.o' failed remote: make: *** [Release/obj.target/sharp-linux-x64/src/common.o] Error 1 remote: make: Leaving directory '/tmp/build_e87a24ec/node_modules/sharp/build' remote: gyp ERR! build error

lovell commented 3 years ago

I tried upgrading my npm

This looks like a filesystem permissions problem. Please ensure the user you are running npm as has write access to the directory you are running it in, as well as write access to the npm cache. This is especially important when using npm v7, which has breaking changes around file permissions.

What is the complete output of running npm install --verbose sharp?

What is the output of running npx envinfo --binaries --system?

thef0under commented 3 years ago

Npm has write access in the directory and in the npm cache. I tried installing sharp both with npm 6.x and with the latest version... unfortunately with no success yet.

OUTPUT "npm install --verbose sharp": ... npm verb cli 'install', npm verb cli '--verbose', npm verb cli 'sharp' npm verb cli ] npm info using npm@8.1.1 npm info using node@v12.18.0 npm timing npm:load:whichnode Completed in 0ms npm timing config:load:defaults Completed in 1ms npm timing config:load:file:C:\Users\C1\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 2ms npm timing config:load:builtin Completed in 2ms npm timing config:load:cli Completed in 3ms npm timing config:load:env Completed in 0ms npm timing config:load:file:C:\C05\APP\app1\app1a\.npmrc Completed in 0ms npm timing config:load:project Completed in 1ms npm timing config:load:file:C:\Users\C1\.npmrc Completed in 1ms npm timing config:load:user Completed in 1ms npm timing config:load:file:C:\Users\C1\AppData\Roaming\npm\etc\npmrc Completed in 0ms npm timing config:load:global Completed in 0ms npm timing config:load:validate Completed in 0ms npm timing config:load:credentials Completed in 0ms npm timing config:load:setEnvs Completed in 1ms npm timing config:load Completed in 10ms npm timing npm:load:configload Completed in 10ms npm timing npm:load:setTitle Completed in 0ms npm timing npm:load:setupLog Completed in 1ms npm timing config:load:flatten Completed in 2ms npm timing npm:load:cleanupLog Completed in 2ms npm timing npm:load:configScope Completed in 0ms npm timing npm:load:projectScope Completed in 1ms npm timing npm:load Completed in 51ms npm timing arborist:ctor Completed in 1ms npm timing idealTree:init Completed in 320ms npm timing idealTree:userRequests Completed in 3ms npm timing arborist:ctor Completed in 0ms npm http fetch GET 200 https://registry.npmjs.org/sharp 1435ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/color 77ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/prebuild-install 169ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/semver 173ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/node-addon-api 198ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/detect-libc 216ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/tar-fs 218ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/simple-get 227ms (cache revalidated) npm timing idealTree:#root Completed in 1676ms npm http fetch GET 200 https://registry.npmjs.org/expand-template 138ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/npmlog 140ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/decompress-response 142ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/napi-build-utils 145ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/github-from-package 148ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/color-string 152ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/color-convert 167ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/chownr 238ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/mkdirp-classic 241ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/simple-concat 251ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/tar-stream 251ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/node-abi 261ms (cache revalidated) npm timing idealTree:node_modules/sharp Completed in 291ms npm http fetch GET 200 https://registry.npmjs.org/simple-swizzle 88ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/color-name 91ms (cache revalidated) npm timing idealTree:node_modules/color Completed in 96ms npm http fetch GET 200 https://registry.npmjs.org/is-arrayish 94ms (cache revalidated) npm timing idealTree:node_modules/color-string Completed in 98ms npm timing idealTree:node_modules/detect-libc Completed in 0ms npm timing idealTree:node_modules/node-addon-api Completed in 0ms npm http fetch GET 200 https://registry.npmjs.org/console-control-strings 104ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/are-we-there-yet 108ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/gauge 113ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/set-blocking 807ms (cache revalidated) npm timing idealTree:node_modules/prebuild-install Completed in 816ms npm timing idealTree:node_modules/expand-template Completed in 0ms npm timing idealTree:node_modules/github-from-package Completed in 0ms npm timing idealTree:node_modules/mkdirp-classic Completed in 0ms npm timing idealTree:node_modules/napi-build-utils Completed in 0ms npm timing idealTree:node_modules/node-abi Completed in 1ms npm http fetch GET 200 https://registry.npmjs.org/aproba 67ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/delegates 72ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/object-assign 73ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/string-width 79ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/has-unicode 107ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/wide-align 115ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/readable-stream 118ms (cache revalidated) npm timing idealTree:node_modules/npmlog Completed in 124ms npm http fetch GET 200 https://registry.npmjs.org/string_decoder 99ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/isarray 102ms (cache revalidated) npm timing idealTree:node_modules/are-we-there-yet Completed in 105ms npm timing idealTree:node_modules/console-control-strings Completed in 0ms npm timing idealTree:node_modules/delegates Completed in 0ms npm http fetch GET 200 https://registry.npmjs.org/is-fullwidth-code-point 98ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/code-point-at 101ms (cache revalidated) npm timing idealTree:node_modules/gauge Completed in 108ms npm timing idealTree:node_modules/aproba Completed in 0ms npm timing idealTree:node_modules/has-unicode Completed in 0ms npm timing idealTree:node_modules/set-blocking Completed in 0ms npm http fetch GET 200 https://registry.npmjs.org/mimic-response 95ms (cache revalidated) npm timing idealTree:node_modules/simple-get Completed in 99ms npm timing idealTree:node_modules/simple-concat Completed in 1ms npm timing idealTree:node_modules/simple-swizzle Completed in 3ms npm timing idealTree:node_modules/is-arrayish Completed in 0ms npm http fetch GET 200 https://registry.npmjs.org/number-is-nan 79ms (cache revalidated) npm timing idealTree:node_modules/string-width Completed in 88ms npm timing idealTree:node_modules/code-point-at Completed in 0ms npm timing idealTree:node_modules/is-fullwidth-code-point Completed in 2ms npm timing idealTree:node_modules/number-is-nan Completed in 0ms npm http fetch GET 200 https://registry.npmjs.org/bl 127ms (cache revalidated) npm http fetch GET 200 https://registry.npmjs.org/fs-constants 134ms (cache revalidated) npm timing idealTree:node_modules/tar-fs Completed in 152ms npm timing idealTree:node_modules/chownr Completed in 0ms npm http fetch GET 200 https://registry.npmjs.org/buffer 129ms (cache revalidated) npm timing idealTree:node_modules/tar-stream Completed in 146ms npm timing idealTree:node_modules/fs-constants Completed in 0ms npm timing idealTree:node_modules/wide-align Completed in 0ms npm timing idealTree:node_modules/are-we-there-yet/node_modules/readable-stream Completed in 4ms npm timing idealTree:node_modules/are-we-there-yet/node_modules/isarray Completed in 0ms npm timing idealTree:node_modules/are-we-there-yet/node_modules/string_decoder Completed in 0ms npm timing idealTree:node_modules/color/node_modules/color-convert Completed in 1ms npm timing idealTree:node_modules/color/node_modules/color-name Completed in 0ms npm timing idealTree:node_modules/gauge/node_modules/object-assign Completed in 0ms npm timing idealTree:node_modules/node-abi/node_modules/semver Completed in 0ms npm timing idealTree:node_modules/sharp/node_modules/semver Completed in 0ms npm timing idealTree:node_modules/simple-get/node_modules/decompress-response Completed in 2ms npm timing idealTree:node_modules/simple-get/node_modules/mimic-response Completed in 0ms npm http fetch GET 200 https://registry.npmjs.org/ieee754 68ms (cache revalidated) npm timing idealTree:node_modules/tar-stream/node_modules/bl Completed in 71ms npm timing idealTree:node_modules/buffer Completed in 1ms npm timing idealTree:node_modules/ieee754 Completed in 0ms npm timing idealTree:buildDeps Completed in 3959ms npm timing idealTree:fixDepFlags Completed in 13ms npm timing idealTree Completed in 4306ms npm timing reify:loadTrees Completed in 4308ms npm timing reify:diffTrees Completed in 26ms npm timing reify:retireShallow Completed in 1ms npm timing reify:createSparse Completed in 13ms npm timing reify:loadBundles Completed in 0ms npm timing reifyNode:node_modules/code-point-at Completed in 161ms npm timing reifyNode:node_modules/chownr Completed in 163ms npm timing reifyNode:node_modules/is-fullwidth-code-point Completed in 163ms npm timing reifyNode:node_modules/wide-align Completed in 168ms npm timing reifyNode:node_modules/number-is-nan Completed in 170ms npm timing reifyNode:node_modules/string-width Completed in 169ms npm timing reifyNode:node_modules/has-unicode Completed in 170ms npm timing reifyNode:node_modules/aproba Completed in 171ms npm timing reifyNode:node_modules/mkdirp-classic Completed in 168ms npm timing reifyNode:node_modules/simple-swizzle Completed in 167ms npm timing reifyNode:node_modules/simple-get Completed in 170ms npm timing reifyNode:node_modules/gauge/node_modules/object-assign Completed in 175ms npm timing reifyNode:node_modules/color/node_modules/color-name Completed in 175ms npm timing reifyNode:node_modules/color Completed in 190ms npm timing reifyNode:node_modules/fs-constants Completed in 205ms npm timing reifyNode:node_modules/ieee754 Completed in 208ms npm timing reifyNode:node_modules/console-control-strings Completed in 202ms npm timing reifyNode:node_modules/set-blocking Completed in 204ms npm timing reifyNode:node_modules/color-string Completed in 202ms npm timing reifyNode:node_modules/simple-get/node_modules/mimic-response Completed in 202ms npm timing reifyNode:node_modules/napi-build-utils Completed in 215ms npm timing reifyNode:node_modules/npmlog Completed in 217ms npm timing reifyNode:node_modules/simple-get/node_modules/decompress-response Completed in 214ms npm timing reifyNode:node_modules/is-arrayish Completed in 225ms npm timing reifyNode:node_modules/are-we-there-yet/node_modules/string_decoder Completed in 223ms npm timing reifyNode:node_modules/expand-template Completed in 224ms npm timing reifyNode:node_modules/simple-concat Completed in 230ms npm timing reifyNode:node_modules/detect-libc Completed in 227ms npm timing reifyNode:node_modules/buffer Completed in 240ms npm timing reifyNode:node_modules/color/node_modules/color-convert Completed in 231ms npm timing reifyNode:node_modules/are-we-there-yet/node_modules/isarray Completed in 257ms npm timing reifyNode:node_modules/delegates Completed in 259ms npm timing reifyNode:node_modules/node-abi/node_modules/semver Completed in 261ms npm timing reifyNode:node_modules/tar-stream Completed in 269ms npm timing reifyNode:node_modules/are-we-there-yet Completed in 267ms npm timing reifyNode:node_modules/tar-stream/node_modules/bl Completed in 292ms npm timing reifyNode:node_modules/node-abi Completed in 288ms npm timing reifyNode:node_modules/github-from-package Completed in 290ms npm timing reifyNode:node_modules/prebuild-install Completed in 293ms npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 330ms npm timing auditReport:getReport Completed in 334ms npm timing reifyNode:node_modules/gauge Completed in 328ms npm timing metavuln:cache:get:security-advisory:ansi-regex:MnjBQhWFwFkmPMPb2LclMhDfT8OCnRPetf8SCJdoqGvp1Bb0HJtPoZakX9Efg7taRQJTGHclNIupkFKqXo1Dfg== Completed in 8ms npm timing metavuln:cache:get:security-advisory:lodash:+BA2TaCfPgMMcRpoOsjDpbNLvC/NVtmnsDtahhHbKXRXdQuvl12dQY+6pJM0voTWAZOYhHcA9UJ6Gg9ub4BPpA== Completed in 9ms npm timing metavuln:cache:get:security-advisory:lodash:ibnazL4kokIkJIlCFdrUUaCUhlm3zmGVzYXHuaUYFDXf82VnpxZuLq60tlE1JB0Xku3r9M0kUaSNu4YVGqCA+Q== Completed in 9ms npm timing metavuln:cache:get:security-advisory:pug:k+2VvLwPDyuH/D140iSSC8igSdId9oaW1HXdJGkBRlCXr4Cv+GOEaqV+KMayyKeeLPGloOCRoKwnFm4AUSHdCg== Completed in 10ms npm timing reifyNode:node_modules/tar-fs Completed in 347ms npm timing reifyNode:node_modules/node-addon-api Completed in 354ms npm timing reifyNode:node_modules/are-we-there-yet/node_modules/readable-stream Completed in 361ms npm timing reifyNode:node_modules/sharp Completed in 389ms npm timing reifyNode:node_modules/sharp/node_modules/semver Completed in 391ms npm timing reify:unpack Completed in 405ms npm timing reify:unretire Completed in 1ms npm timing build:queue Completed in 3ms npm http fetch GET 200 https://registry.npmjs.org/ansi-regex 138ms (cache revalidated) npm timing metavuln:packument:ansi-regex Completed in 139ms npm timing metavuln:load:security-advisory:ansi-regex:1002401 Completed in 1ms npm timing metavuln:calculate:security-advisory:ansi-regex:1002401 Completed in 141ms npm http fetch GET 200 https://registry.npmjs.org/pug 140ms (cache revalidated) npm timing metavuln:packument:pug Completed in 141ms npm timing metavuln:load:security-advisory:pug:1002934 Completed in 1ms npm timing metavuln:calculate:security-advisory:pug:1002934 Completed in 143ms npm timing build:link:node_modules/node-abi/node_modules/semver Completed in 59ms npm timing build:link:node_modules/detect-libc Completed in 61ms npm timing build:link:node_modules/prebuild-install Completed in 60ms npm timing build:link:node_modules/sharp/node_modules/semver Completed in 60ms npm timing build:link Completed in 63ms npm info run sharp@0.29.2 install node_modules/sharp (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy) npm http fetch GET 200 https://registry.npmjs.org/lodash 157ms (cache revalidated) npm timing metavuln:packument:lodash Completed in 163ms npm timing metavuln:load:security-advisory:lodash:1002847 Completed in 2ms npm timing metavuln:calculate:security-advisory:lodash:1002847 Completed in 167ms npm timing metavuln:load:security-advisory:lodash:1004063 Completed in 0ms npm timing metavuln:calculate:security-advisory:lodash:1004063 Completed in 168ms npm timing metavuln:cache:get:security-advisory:strip-ansi:3+Lck0bTYbnkScUdMxQwoYX9TX29DpNbh0kKo79cpaTAFAkeata/DRpMZSymAH7cxXBroSBEKldl9Ujtv9uEFg== Completed in 3ms npm http fetch GET 200 https://registry.npmjs.org/strip-ansi 69ms (cache revalidated) npm timing metavuln:packument:strip-ansi Completed in 70ms npm timing metavuln:load:security-advisory:strip-ansi:MnjBQhWFwFkmPMPb2LclMhDfT8OCnRPetf8SCJdoqGvp1Bb0HJtPoZakX9Efg7taRQJTGHclNIupkFKqXo1Dfg== Completed in 0ms npm timing metavuln:calculate:security-advisory:strip-ansi:MnjBQhWFwFkmPMPb2LclMhDfT8OCnRPetf8SCJdoqGvp1Bb0HJtPoZakX9Efg7taRQJTGHclNIupkFKqXo1Dfg== Completed in 72ms npm timing metavuln:cache:get:security-advisory:coinbase-commerce-node:ABaZdAnZLPTcF/JB30+54wHysblxUh11ztmRmQL+qQaEIxM7bQm5p/cB5on/XFGVcO5kEOa+8yxcfYIyP79eyA== Completed in 3ms npm http fetch GET 200 https://registry.npmjs.org/coinbase-commerce-node 781ms (cache revalidated) npm timing metavuln:packument:coinbase-commerce-node Completed in 782ms npm timing metavuln:load:security-advisory:coinbase-commerce-node:+BA2TaCfPgMMcRpoOsjDpbNLvC/NVtmnsDtahhHbKXRXdQuvl12dQY+6pJM0voTWAZOYhHcA9UJ6Gg9ub4BPpA== Completed in 0ms npm timing metavuln:calculate:security-advisory:coinbase-commerce-node:+BA2TaCfPgMMcRpoOsjDpbNLvC/NVtmnsDtahhHbKXRXdQuvl12dQY+6pJM0voTWAZOYhHcA9UJ6Gg9ub4BPpA== Completed in 783ms npm timing metavuln:packument:string-width Completed in 0ms npm timing metavuln:cache:get:security-advisory:string-width:XLdQxI8EM4Vtlga+GCAZa7fuMHS6Ixx/29u7DAAGosOgC/o37GvKCvauVmWp8ye6D2LiGCdy+j/lsFWCmZe9gA== Completed in 3ms npm timing metavuln:load:security-advisory:string-width:3+Lck0bTYbnkScUdMxQwoYX9TX29DpNbh0kKo79cpaTAFAkeata/DRpMZSymAH7cxXBroSBEKldl9Ujtv9uEFg== Completed in 0ms npm timing metavuln:calculate:security-advisory:string-width:3+Lck0bTYbnkScUdMxQwoYX9TX29DpNbh0kKo79cpaTAFAkeata/DRpMZSymAH7cxXBroSBEKldl9Ujtv9uEFg== Completed in 5ms npm timing metavuln:cache:get:security-advisory:ansi-align:SpGwbU2ElZqKJwdae1cEgZJKJDhaYPqsz4u/AcZuTJqJkc5zh8AwR1tWSyyVyw+sj9GTkv5LtTPbkyM17EKd3Q== Completed in 6ms npm timing metavuln:cache:get:security-advisory:boxen:8bFFbq/OlXCfRkDeNYNHKhET+0iuF6IbQLPmlviKF2lChiyKPHa5vEEGbLo8LWWWRTGBp1IxOmxlizKQt85ySQ== Completed in 15ms npm timing metavuln:cache:get:security-advisory:widest-line:Vw2mBa7+fwziRBGc+yklTDnOe4cPbr+8ThQBycTXK27OLcWEb6lHacJGCj8iJGMjjRHDdUzr1G174CUQ+ak4tg== Completed in 16ms npm http fetch GET 200 https://registry.npmjs.org/ansi-align 154ms (cache revalidated) npm timing metavuln:packument:ansi-align Completed in 156ms npm timing metavuln:load:security-advisory:ansi-align:XLdQxI8EM4Vtlga+GCAZa7fuMHS6Ixx/29u7DAAGosOgC/o37GvKCvauVmWp8ye6D2LiGCdy+j/lsFWCmZe9gA== Completed in 0ms npm timing metavuln:calculate:security-advisory:ansi-align:XLdQxI8EM4Vtlga+GCAZa7fuMHS6Ixx/29u7DAAGosOgC/o37GvKCvauVmWp8ye6D2LiGCdy+j/lsFWCmZe9gA== Completed in 158ms npm http fetch GET 200 https://registry.npmjs.org/boxen 161ms (cache revalidated) npm timing metavuln:packument:boxen Completed in 162ms npm timing metavuln:load:security-advisory:boxen:XLdQxI8EM4Vtlga+GCAZa7fuMHS6Ixx/29u7DAAGosOgC/o37GvKCvauVmWp8ye6D2LiGCdy+j/lsFWCmZe9gA== Completed in 0ms npm timing metavuln:calculate:security-advisory:boxen:XLdQxI8EM4Vtlga+GCAZa7fuMHS6Ixx/29u7DAAGosOgC/o37GvKCvauVmWp8ye6D2LiGCdy+j/lsFWCmZe9gA== Completed in 164ms npm http fetch GET 200 https://registry.npmjs.org/widest-line 165ms (cache revalidated) npm timing metavuln:packument:widest-line Completed in 167ms npm timing metavuln:load:security-advisory:widest-line:XLdQxI8EM4Vtlga+GCAZa7fuMHS6Ixx/29u7DAAGosOgC/o37GvKCvauVmWp8ye6D2LiGCdy+j/lsFWCmZe9gA== Completed in 0ms npm timing metavuln:calculate:security-advisory:widest-line:XLdQxI8EM4Vtlga+GCAZa7fuMHS6Ixx/29u7DAAGosOgC/o37GvKCvauVmWp8ye6D2LiGCdy+j/lsFWCmZe9gA== Completed in 168ms npm timing metavuln:cache:get:security-advisory:boxen:Nhrefm6qtHxxbw1Hvs5hXD4b5Q7upgttXkoJNmKtZLy27hRtbqkvbij8LZRtNdGUOrCR/h+V+jd2MKgt3WnYyw== Completed in 1ms npm timing metavuln:load:security-advisory:boxen:Vw2mBa7+fwziRBGc+yklTDnOe4cPbr+8ThQBycTXK27OLcWEb6lHacJGCj8iJGMjjRHDdUzr1G174CUQ+ak4tg== Completed in 0ms npm timing metavuln:calculate:security-advisory:boxen:Vw2mBa7+fwziRBGc+yklTDnOe4cPbr+8ThQBycTXK27OLcWEb6lHacJGCj8iJGMjjRHDdUzr1G174CUQ+ak4tg== Completed in 16ms npm timing metavuln:cache:get:security-advisory:update-notifier:HA+loFfsPjFkmOvrYBPN+0Wx/uV465hIdK5LNnHKrep3IqBXhcE4gd4e7K3CWBuMnZeWXowlO7xAqccpNAfEOQ== Completed in 2ms npm http fetch GET 200 https://registry.npmjs.org/update-notifier 152ms (cache revalidated) npm timing metavuln:packument:update-notifier Completed in 153ms npm timing metavuln:load:security-advisory:update-notifier:Nhrefm6qtHxxbw1Hvs5hXD4b5Q7upgttXkoJNmKtZLy27hRtbqkvbij8LZRtNdGUOrCR/h+V+jd2MKgt3WnYyw== Completed in 0ms npm timing metavuln:calculate:security-advisory:update-notifier:Nhrefm6qtHxxbw1Hvs5hXD4b5Q7upgttXkoJNmKtZLy27hRtbqkvbij8LZRtNdGUOrCR/h+V+jd2MKgt3WnYyw== Completed in 153ms npm timing auditReport:init Completed in 1380ms npm timing reify:audit Completed in 1717ms npm info run sharp@0.29.2 install { code: 0, signal: null } npm timing build:run:install:node_modules/sharp Completed in 2188ms npm timing build:run:install Completed in 2190ms npm timing build:deps Completed in 2257ms npm timing build Completed in 2258ms npm timing reify:build Completed in 2259ms npm timing reify:trash Completed in 0ms npm timing reify:save Completed in 145ms npm timing reify Completed in 7221ms

OUTPUT "npx envinfo --binaries --system": ... Binaries: Node: 12.18.0 - C:\Program Files\nodejs\node.EXE npm: 8.1.1 - C:\Program Files\nodejs\npm.CMD

lovell commented 3 years ago

Please can you provide the complete output of running npm install --verbose sharp in an empty directory, ideally using npm v6 (to help remove breaking changes in npm v8 as a possible cause).

thef0under commented 3 years ago

Sure.

OUTPUT "npm install --verbose sharp" in empty directory using npm@6.14.15: ` npm info it worked if it ends with ok npm verb cli [ npm verb cli 'C:\Program Files\nodejs\node.exe', npm verb cli 'C:\Users\C1\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js', npm verb cli 'install', npm verb cli '--verbose', npm verb cli 'sharp' npm verb cli ] npm info using npm@6.14.15 npm info using node@v12.18.0 npm verb npm-session bb816f7d120e43d0 npm http fetch GET 304 https://registry.npmjs.org/sharp 1035ms (from cache) npm timing stage:loadCurrentTree Completed in 1089ms npm timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms npm timing stage:loadIdealTree:loadShrinkwrap Completed in 1ms npm http fetch GET 304 https://registry.npmjs.org/color 101ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/prebuild-install 273ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/node-addon-api 278ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/detect-libc 969ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/tunnel-agent 1007ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/simple-get 1010ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/tar-fs 1012ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/semver 1209ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/color-string 93ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/color-convert 98ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/color-name 127ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/simple-swizzle 86ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/is-arrayish 834ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/minimist 89ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/pump 92ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/mkdirp-classic 101ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/rc 268ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/github-from-package 801ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/expand-template 811ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/napi-build-utils 807ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/node-abi 810ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/npmlog 829ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/console-control-strings 119ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/gauge 121ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/are-we-there-yet 126ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/set-blocking 132ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/delegates 114ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/readable-stream 116ms (from cache) npm http fetch GET 200 https://registry.npmjs.org/core-util-is 106ms npm http fetch GET 304 https://registry.npmjs.org/isarray 112ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/process-nextick-args 117ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/inherits 184ms (from cache) npm http fetch GET 200 https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz 118ms npm http fetch GET 304 https://registry.npmjs.org/util-deprecate 231ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/string_decoder 285ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/safe-buffer 286ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/signal-exit 131ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/strip-ansi 131ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/object-assign 134ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/string-width 136ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/has-unicode 140ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/aproba 141ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/wide-align 822ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/is-fullwidth-code-point 101ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/code-point-at 105ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/number-is-nan 883ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/ansi-regex 139ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/end-of-stream 84ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/once 781ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/wrappy 821ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/deep-extend 129ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/ini 130ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/strip-json-comments 1097ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/decompress-response 87ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/simple-concat 792ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/mimic-response 92ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/chownr 89ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/tar-stream 813ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/fs-constants 96ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/bl 100ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/buffer 90ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/base64-js 79ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/ieee754 82ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/lru-cache 825ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/yallist 79ms (from cache) npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 11619ms npm timing stage:loadIdealTree Completed in 11641ms npm timing stage:generateActionsToTake Completed in 17ms npm verb correctMkdir C:\Users\C1\AppData\Roaming\npm-cache_locks correctMkdir not in flight; initializing npm verb makeCacheDir UID & GID are irrelevant on win32 npm verb lock using C:\Users\C1\AppData\Roaming\npm-cache_locks\staging-56c392b7209e4b68.lock for C:\test1\node_modules.staging npm timing audit submit Completed in 298ms npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 299ms npm timing audit body Completed in 1ms npm timing action:extract Completed in 289ms npm timing action:finalize Completed in 186ms npm timing action:refresh-package-json Completed in 175ms npm info lifecycle ansi-regex@2.1.1~preinstall: ansi-regex@2.1.1 npm info lifecycle aproba@1.2.0~preinstall: aproba@1.2.0 npm info lifecycle base64-js@1.5.1~preinstall: base64-js@1.5.1 npm info lifecycle chownr@1.1.4~preinstall: chownr@1.1.4 npm info lifecycle code-point-at@1.1.0~preinstall: code-point-at@1.1.0 npm info lifecycle color-name@1.1.4~preinstall: color-name@1.1.4 npm info lifecycle color-convert@2.0.1~preinstall: color-convert@2.0.1 npm info lifecycle console-control-strings@1.1.0~preinstall: console-control-strings@1.1.0 npm info lifecycle core-util-is@1.0.3~preinstall: core-util-is@1.0.3 npm info lifecycle deep-extend@0.6.0~preinstall: deep-extend@0.6.0 npm info lifecycle delegates@1.0.0~preinstall: delegates@1.0.0 npm info lifecycle detect-libc@1.0.3~preinstall: detect-libc@1.0.3 npm info lifecycle expand-template@2.0.3~preinstall: expand-template@2.0.3 npm info lifecycle fs-constants@1.0.0~preinstall: fs-constants@1.0.0 npm info lifecycle github-from-package@0.0.0~preinstall: github-from-package@0.0.0 npm info lifecycle has-unicode@2.0.1~preinstall: has-unicode@2.0.1 npm info lifecycle ieee754@1.2.1~preinstall: ieee754@1.2.1 npm info lifecycle buffer@5.7.1~preinstall: buffer@5.7.1 npm info lifecycle inherits@2.0.4~preinstall: inherits@2.0.4 npm info lifecycle ini@1.3.8~preinstall: ini@1.3.8 npm info lifecycle is-arrayish@0.3.2~preinstall: is-arrayish@0.3.2 npm info lifecycle isarray@1.0.0~preinstall: isarray@1.0.0 npm info lifecycle mimic-response@2.1.0~preinstall: mimic-response@2.1.0 npm info lifecycle decompress-response@4.2.1~preinstall: decompress-response@4.2.1 npm info lifecycle minimist@1.2.5~preinstall: minimist@1.2.5 npm info lifecycle mkdirp-classic@0.5.3~preinstall: mkdirp-classic@0.5.3 npm info lifecycle napi-build-utils@1.0.2~preinstall: napi-build-utils@1.0.2 npm info lifecycle semver@5.7.1~preinstall: semver@5.7.1 npm info lifecycle node-abi@2.30.1~preinstall: node-abi@2.30.1 npm info lifecycle number-is-nan@1.0.1~preinstall: number-is-nan@1.0.1 npm info lifecycle is-fullwidth-code-point@1.0.0~preinstall: is-fullwidth-code-point@1.0.0 npm info lifecycle object-assign@4.1.1~preinstall: object-assign@4.1.1 npm info lifecycle process-nextick-args@2.0.1~preinstall: process-nextick-args@2.0.1 npm info lifecycle safe-buffer@5.1.2~preinstall: safe-buffer@5.1.2 npm info lifecycle set-blocking@2.0.0~preinstall: set-blocking@2.0.0 npm info lifecycle signal-exit@3.0.5~preinstall: signal-exit@3.0.5 npm info lifecycle simple-concat@1.0.1~preinstall: simple-concat@1.0.1 npm info lifecycle simple-swizzle@0.2.2~preinstall: simple-swizzle@0.2.2 npm info lifecycle color-string@1.6.0~preinstall: color-string@1.6.0 npm info lifecycle string_decoder@1.1.1~preinstall: string_decoder@1.1.1 npm info lifecycle strip-ansi@3.0.1~preinstall: strip-ansi@3.0.1 npm info lifecycle string-width@1.0.2~preinstall: string-width@1.0.2 npm info lifecycle strip-json-comments@2.0.1~preinstall: strip-json-comments@2.0.1 npm info lifecycle rc@1.2.8~preinstall: rc@1.2.8 npm info lifecycle tunnel-agent@0.6.0~preinstall: tunnel-agent@0.6.0 npm info lifecycle util-deprecate@1.0.2~preinstall: util-deprecate@1.0.2 npm info lifecycle readable-stream@3.6.0~preinstall: readable-stream@3.6.0 npm info lifecycle bl@4.1.0~preinstall: bl@4.1.0 npm info lifecycle readable-stream@2.3.7~preinstall: readable-stream@2.3.7 npm info lifecycle are-we-there-yet@1.1.7~preinstall: are-we-there-yet@1.1.7 npm info lifecycle sharp@0.29.2~preinstall: sharp@0.29.2 npm info lifecycle semver@7.3.5~preinstall: semver@7.3.5 npm info lifecycle prebuild-install@6.1.4~preinstall: prebuild-install@6.1.4 npm info lifecycle node-addon-api@4.2.0~preinstall: node-addon-api@4.2.0 npm info lifecycle color@4.0.1~preinstall: color@4.0.1 npm info lifecycle lru-cache@6.0.0~preinstall: lru-cache@6.0.0 npm info lifecycle yallist@4.0.0~preinstall: yallist@4.0.0 npm info lifecycle simple-get@3.1.0~preinstall: simple-get@3.1.0 npm info lifecycle tar-fs@2.1.1~preinstall: tar-fs@2.1.1 npm info lifecycle pump@3.0.0~preinstall: pump@3.0.0 npm info lifecycle tar-stream@2.2.0~preinstall: tar-stream@2.2.0 npm info lifecycle end-of-stream@1.4.4~preinstall: end-of-stream@1.4.4 npm info lifecycle once@1.4.0~preinstall: once@1.4.0 npm info lifecycle wrappy@1.0.2~preinstall: wrappy@1.0.2 npm info lifecycle npmlog@4.1.2~preinstall: npmlog@4.1.2 npm info lifecycle gauge@2.7.4~preinstall: gauge@2.7.4 npm info lifecycle wide-align@1.1.5~preinstall: wide-align@1.1.5 npm info lifecycle readable-stream@3.6.0~preinstall: readable-stream@3.6.0 npm timing action:preinstall Completed in 1830ms npm info linkStuff ansi-regex@2.1.1 npm info linkStuff aproba@1.2.0 npm info linkStuff base64-js@1.5.1 npm info linkStuff chownr@1.1.4 npm info linkStuff code-point-at@1.1.0 npm info linkStuff color-name@1.1.4 npm info linkStuff color-convert@2.0.1 npm info linkStuff console-control-strings@1.1.0 npm info linkStuff core-util-is@1.0.3 npm info linkStuff deep-extend@0.6.0 npm info linkStuff delegates@1.0.0 npm info linkStuff detect-libc@1.0.3 npm verb linkBins [ npm verb linkBins { 'detect-libc': 'bin/detect-libc.js' }, npm verb linkBins 'C:\test1\node_modules\.bin', npm verb linkBins false npm verb linkBins ] npm info linkStuff expand-template@2.0.3 npm info linkStuff fs-constants@1.0.0 npm info linkStuff github-from-package@0.0.0 npm info linkStuff has-unicode@2.0.1 npm info linkStuff ieee754@1.2.1 npm info linkStuff buffer@5.7.1 npm info linkStuff inherits@2.0.4 npm info linkStuff ini@1.3.8 npm info linkStuff is-arrayish@0.3.2 npm info linkStuff isarray@1.0.0 npm info linkStuff mimic-response@2.1.0 npm info linkStuff decompress-response@4.2.1 npm info linkStuff minimist@1.2.5 npm info linkStuff mkdirp-classic@0.5.3 npm info linkStuff napi-build-utils@1.0.2 npm info linkStuff semver@5.7.1 npm verb linkBins [ npm verb linkBins { semver: 'bin/semver' }, npm verb linkBins 'C:\test1\node_modules\node-abi\node_modules\.bin', npm verb linkBins false npm verb linkBins ] npm info linkStuff node-abi@2.30.1 npm info linkStuff number-is-nan@1.0.1 npm info linkStuff is-fullwidth-code-point@1.0.0 npm info linkStuff object-assign@4.1.1 npm info linkStuff process-nextick-args@2.0.1 npm info linkStuff safe-buffer@5.1.2 npm info linkStuff set-blocking@2.0.0 npm info linkStuff signal-exit@3.0.5 npm info linkStuff simple-concat@1.0.1 npm info linkStuff simple-swizzle@0.2.2 npm info linkStuff color-string@1.6.0 npm info linkStuff string_decoder@1.1.1 npm info linkStuff strip-ansi@3.0.1 npm info linkStuff string-width@1.0.2 npm info linkStuff strip-json-comments@2.0.1 npm info linkStuff rc@1.2.8 npm verb linkBins [ { rc: 'cli.js' }, 'C:\test1\node_modules\.bin', false ] npm info linkStuff tunnel-agent@0.6.0 npm info linkStuff util-deprecate@1.0.2 npm info linkStuff readable-stream@3.6.0 npm info linkStuff bl@4.1.0 npm info linkStuff readable-stream@2.3.7 npm info linkStuff are-we-there-yet@1.1.7 npm info linkStuff readable-stream@3.6.0 npm info linkStuff wide-align@1.1.5 npm info linkStuff gauge@2.7.4 npm info linkStuff npmlog@4.1.2 npm info linkStuff wrappy@1.0.2 npm info linkStuff once@1.4.0 npm info linkStuff end-of-stream@1.4.4 npm info linkStuff tar-stream@2.2.0 npm info linkStuff pump@3.0.0 npm info linkStuff tar-fs@2.1.1 npm info linkStuff simple-get@3.1.0 npm info linkStuff yallist@4.0.0 npm info linkStuff lru-cache@6.0.0 npm info linkStuff color@4.0.1 npm info linkStuff node-addon-api@4.2.0 npm info linkStuff prebuild-install@6.1.4 npm verb linkBins [ npm verb linkBins { 'prebuild-install': 'bin.js' }, npm verb linkBins 'C:\test1\node_modules\.bin', npm verb linkBins false npm verb linkBins ] npm info linkStuff semver@7.3.5 npm verb linkBins [ { semver: 'bin/semver.js' }, 'C:\test1\node_modules\.bin', false ] npm info linkStuff sharp@0.29.2 npm timing action:build Completed in 2400ms npm info lifecycle ansi-regex@2.1.1~install: ansi-regex@2.1.1 npm info lifecycle aproba@1.2.0~install: aproba@1.2.0 npm info lifecycle base64-js@1.5.1~install: base64-js@1.5.1 npm info lifecycle chownr@1.1.4~install: chownr@1.1.4 npm info lifecycle code-point-at@1.1.0~install: code-point-at@1.1.0 npm info lifecycle color-name@1.1.4~install: color-name@1.1.4 npm info lifecycle color-convert@2.0.1~install: color-convert@2.0.1 npm info lifecycle console-control-strings@1.1.0~install: console-control-strings@1.1.0 npm info lifecycle core-util-is@1.0.3~install: core-util-is@1.0.3 npm info lifecycle deep-extend@0.6.0~install: deep-extend@0.6.0 npm info lifecycle delegates@1.0.0~install: delegates@1.0.0 npm info lifecycle detect-libc@1.0.3~install: detect-libc@1.0.3 npm info lifecycle expand-template@2.0.3~install: expand-template@2.0.3 npm info lifecycle fs-constants@1.0.0~install: fs-constants@1.0.0 npm info lifecycle github-from-package@0.0.0~install: github-from-package@0.0.0 npm info lifecycle has-unicode@2.0.1~install: has-unicode@2.0.1 npm info lifecycle ieee754@1.2.1~install: ieee754@1.2.1 npm info lifecycle buffer@5.7.1~install: buffer@5.7.1 npm info lifecycle inherits@2.0.4~install: inherits@2.0.4 npm info lifecycle ini@1.3.8~install: ini@1.3.8 npm info lifecycle is-arrayish@0.3.2~install: is-arrayish@0.3.2 npm info lifecycle isarray@1.0.0~install: isarray@1.0.0 npm info lifecycle mimic-response@2.1.0~install: mimic-response@2.1.0 npm info lifecycle decompress-response@4.2.1~install: decompress-response@4.2.1 npm info lifecycle minimist@1.2.5~install: minimist@1.2.5 npm info lifecycle mkdirp-classic@0.5.3~install: mkdirp-classic@0.5.3 npm info lifecycle napi-build-utils@1.0.2~install: napi-build-utils@1.0.2 npm info lifecycle semver@5.7.1~install: semver@5.7.1 npm info lifecycle node-abi@2.30.1~install: node-abi@2.30.1 npm info lifecycle number-is-nan@1.0.1~install: number-is-nan@1.0.1 npm info lifecycle is-fullwidth-code-point@1.0.0~install: is-fullwidth-code-point@1.0.0 npm info lifecycle object-assign@4.1.1~install: object-assign@4.1.1 npm info lifecycle process-nextick-args@2.0.1~install: process-nextick-args@2.0.1 npm info lifecycle safe-buffer@5.1.2~install: safe-buffer@5.1.2 npm info lifecycle set-blocking@2.0.0~install: set-blocking@2.0.0 npm info lifecycle signal-exit@3.0.5~install: signal-exit@3.0.5 npm info lifecycle simple-concat@1.0.1~install: simple-concat@1.0.1 npm info lifecycle simple-swizzle@0.2.2~install: simple-swizzle@0.2.2 npm info lifecycle color-string@1.6.0~install: color-string@1.6.0 npm info lifecycle string_decoder@1.1.1~install: string_decoder@1.1.1 npm info lifecycle strip-ansi@3.0.1~install: strip-ansi@3.0.1 npm info lifecycle string-width@1.0.2~install: string-width@1.0.2 npm info lifecycle strip-json-comments@2.0.1~install: strip-json-comments@2.0.1 npm info lifecycle rc@1.2.8~install: rc@1.2.8 npm info lifecycle tunnel-agent@0.6.0~install: tunnel-agent@0.6.0 npm info lifecycle util-deprecate@1.0.2~install: util-deprecate@1.0.2 npm info lifecycle readable-stream@3.6.0~install: readable-stream@3.6.0 npm info lifecycle bl@4.1.0~install: bl@4.1.0 npm info lifecycle readable-stream@2.3.7~install: readable-stream@2.3.7 npm info lifecycle are-we-there-yet@1.1.7~install: are-we-there-yet@1.1.7 npm info lifecycle readable-stream@3.6.0~install: readable-stream@3.6.0 npm info lifecycle wide-align@1.1.5~install: wide-align@1.1.5 npm info lifecycle gauge@2.7.4~install: gauge@2.7.4 npm info lifecycle npmlog@4.1.2~install: npmlog@4.1.2 npm info lifecycle wrappy@1.0.2~install: wrappy@1.0.2 npm info lifecycle once@1.4.0~install: once@1.4.0 npm info lifecycle end-of-stream@1.4.4~install: end-of-stream@1.4.4 npm info lifecycle tar-stream@2.2.0~install: tar-stream@2.2.0 npm info lifecycle pump@3.0.0~install: pump@3.0.0 npm info lifecycle tar-fs@2.1.1~install: tar-fs@2.1.1 npm info lifecycle simple-get@3.1.0~install: simple-get@3.1.0 npm info lifecycle yallist@4.0.0~install: yallist@4.0.0 npm info lifecycle lru-cache@6.0.0~install: lru-cache@6.0.0 npm info lifecycle color@4.0.1~install: color@4.0.1 npm info lifecycle node-addon-api@4.2.0~install: node-addon-api@4.2.0 npm info lifecycle prebuild-install@6.1.4~install: prebuild-install@6.1.4 npm info lifecycle semver@7.3.5~install: semver@7.3.5 npm info lifecycle sharp@0.29.2~install: sharp@0.29.2

sharp@0.29.2 install C:\test1\node_modules\sharp (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)

sharp: Using cached C:\Users\C1\AppData\Roaming\npm-cache_libvips\libvips-8.11.3-win32-x64.tar.br sharp: Creating C:\test1\node_modules\sharp\build\Release sharp: Copying DLLs from C:\test1\node_modules\sharp\vendor\8.11.3\win32-x64\lib to C:\test1\node_modules\sharp\build\Release prebuild-install info begin Prebuild-install version 6.1.4 prebuild-install info looking for local prebuild @ prebuilds\sharp-v0.29.2-napi-v5-win32-x64.tar.gz prebuild-install info looking for cached prebuild @ C:\Users\C1\AppData\Roaming\npm-cache_prebuilds\e6e054-sharp-v0.29.2-napi-v5-win32-x64.tar.gz prebuild-install info found cached prebuild prebuild-install info unpacking @ C:\Users\C1\AppData\Roaming\npm-cache_prebuilds\e6e054-sharp-v0.29.2-napi-v5-win32-x64.tar.gz prebuild-install info unpack resolved to C:\test1\node_modules\sharp\build\Release\sharp-win32-x64.node prebuild-install info install Successfully installed prebuilt binary! npm verb lifecycle sharp@0.29.2~install: unsafe-perm in lifecycle true npm verb lifecycle sharp@0.29.2~install: PATH: C:\Users\C1\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\test1\node_modules\sharp\node_modules.bin;C:\test1\node_modules.bin;C:\Python3.9\Scripts\;C:\Python3.9\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Server\4.0\bin;C:\xampp\php;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Python34\Scripts;C:\Projects\inst\chromedriver_win32;C:\Users\C1\AppData\Roaming\npm\node_modules\artillery\bin\artillery;C:\Program Files\nodejs\;C:\Program Files\Heroku\bin;C:\Users\C1\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\C1\AppData\Roaming\npm\node_modules\artillery\bin\artillery;C:\Users\C1\AppData\Roaming\npm;C:\Users\C1\AppData\Local\Microsoft\WindowsApps npm verb lifecycle sharp@0.29.2~install: CWD: C:\test1\node_modules\sharp npm timing action:install Completed in 10194ms npm info lifecycle ansi-regex@2.1.1~postinstall: ansi-regex@2.1.1 npm info lifecycle aproba@1.2.0~postinstall: aproba@1.2.0 npm info lifecycle base64-js@1.5.1~postinstall: base64-js@1.5.1 npm info lifecycle chownr@1.1.4~postinstall: chownr@1.1.4 npm info lifecycle code-point-at@1.1.0~postinstall: code-point-at@1.1.0 npm info lifecycle color-name@1.1.4~postinstall: color-name@1.1.4 npm info lifecycle color-convert@2.0.1~postinstall: color-convert@2.0.1 npm info lifecycle console-control-strings@1.1.0~postinstall: console-control-strings@1.1.0 npm info lifecycle core-util-is@1.0.3~postinstall: core-util-is@1.0.3 npm info lifecycle deep-extend@0.6.0~postinstall: deep-extend@0.6.0 npm info lifecycle delegates@1.0.0~postinstall: delegates@1.0.0 npm info lifecycle detect-libc@1.0.3~postinstall: detect-libc@1.0.3 npm info lifecycle expand-template@2.0.3~postinstall: expand-template@2.0.3 npm info lifecycle fs-constants@1.0.0~postinstall: fs-constants@1.0.0 npm info lifecycle github-from-package@0.0.0~postinstall: github-from-package@0.0.0 npm info lifecycle has-unicode@2.0.1~postinstall: has-unicode@2.0.1 npm info lifecycle ieee754@1.2.1~postinstall: ieee754@1.2.1 npm info lifecycle buffer@5.7.1~postinstall: buffer@5.7.1 npm info lifecycle inherits@2.0.4~postinstall: inherits@2.0.4 npm info lifecycle ini@1.3.8~postinstall: ini@1.3.8 npm info lifecycle is-arrayish@0.3.2~postinstall: is-arrayish@0.3.2 npm info lifecycle isarray@1.0.0~postinstall: isarray@1.0.0 npm info lifecycle mimic-response@2.1.0~postinstall: mimic-response@2.1.0 npm info lifecycle decompress-response@4.2.1~postinstall: decompress-response@4.2.1 npm info lifecycle minimist@1.2.5~postinstall: minimist@1.2.5 npm info lifecycle mkdirp-classic@0.5.3~postinstall: mkdirp-classic@0.5.3 npm info lifecycle napi-build-utils@1.0.2~postinstall: napi-build-utils@1.0.2 npm info lifecycle semver@5.7.1~postinstall: semver@5.7.1 npm info lifecycle node-abi@2.30.1~postinstall: node-abi@2.30.1 npm info lifecycle number-is-nan@1.0.1~postinstall: number-is-nan@1.0.1 npm info lifecycle is-fullwidth-code-point@1.0.0~postinstall: is-fullwidth-code-point@1.0.0 npm info lifecycle object-assign@4.1.1~postinstall: object-assign@4.1.1 npm info lifecycle process-nextick-args@2.0.1~postinstall: process-nextick-args@2.0.1 npm info lifecycle safe-buffer@5.1.2~postinstall: safe-buffer@5.1.2 npm info lifecycle set-blocking@2.0.0~postinstall: set-blocking@2.0.0 npm info lifecycle signal-exit@3.0.5~postinstall: signal-exit@3.0.5 npm info lifecycle simple-concat@1.0.1~postinstall: simple-concat@1.0.1 npm info lifecycle simple-swizzle@0.2.2~postinstall: simple-swizzle@0.2.2 npm info lifecycle color-string@1.6.0~postinstall: color-string@1.6.0 npm info lifecycle string_decoder@1.1.1~postinstall: string_decoder@1.1.1 npm info lifecycle strip-ansi@3.0.1~postinstall: strip-ansi@3.0.1 npm info lifecycle string-width@1.0.2~postinstall: string-width@1.0.2 npm info lifecycle strip-json-comments@2.0.1~postinstall: strip-json-comments@2.0.1 npm info lifecycle rc@1.2.8~postinstall: rc@1.2.8 npm info lifecycle tunnel-agent@0.6.0~postinstall: tunnel-agent@0.6.0 npm info lifecycle util-deprecate@1.0.2~postinstall: util-deprecate@1.0.2 npm info lifecycle readable-stream@3.6.0~postinstall: readable-stream@3.6.0 npm info lifecycle bl@4.1.0~postinstall: bl@4.1.0 npm info lifecycle readable-stream@2.3.7~postinstall: readable-stream@2.3.7 npm info lifecycle are-we-there-yet@1.1.7~postinstall: are-we-there-yet@1.1.7 npm info lifecycle readable-stream@3.6.0~postinstall: readable-stream@3.6.0 npm info lifecycle wide-align@1.1.5~postinstall: wide-align@1.1.5 npm info lifecycle gauge@2.7.4~postinstall: gauge@2.7.4 npm info lifecycle npmlog@4.1.2~postinstall: npmlog@4.1.2 npm info lifecycle wrappy@1.0.2~postinstall: wrappy@1.0.2 npm info lifecycle once@1.4.0~postinstall: once@1.4.0 npm info lifecycle end-of-stream@1.4.4~postinstall: end-of-stream@1.4.4 npm info lifecycle tar-stream@2.2.0~postinstall: tar-stream@2.2.0 npm info lifecycle pump@3.0.0~postinstall: pump@3.0.0 npm info lifecycle tar-fs@2.1.1~postinstall: tar-fs@2.1.1 npm info lifecycle simple-get@3.1.0~postinstall: simple-get@3.1.0 npm info lifecycle yallist@4.0.0~postinstall: yallist@4.0.0 npm info lifecycle lru-cache@6.0.0~postinstall: lru-cache@6.0.0 npm info lifecycle color@4.0.1~postinstall: color@4.0.1 npm info lifecycle node-addon-api@4.2.0~postinstall: node-addon-api@4.2.0 npm info lifecycle prebuild-install@6.1.4~postinstall: prebuild-install@6.1.4 npm info lifecycle semver@7.3.5~postinstall: semver@7.3.5 npm info lifecycle sharp@0.29.2~postinstall: sharp@0.29.2 npm timing action:postinstall Completed in 2247ms npm verb unlock done using C:\Users\C1\AppData\Roaming\npm-cache_locks\staging-56c392b7209e4b68.lock for C:\test1\node_modules.staging npm timing stage:executeActions Completed in 17516ms npm timing stage:rollbackFailedOptional Completed in 0ms npm timing stage:runTopLevelLifecycles Completed in 30371ms npm verb saving [ { name: 'sharp', spec: '^0.29.2', save: 'dependencies' } ] npm info lifecycle test1@1.0.0~preshrinkwrap: test1@1.0.0 npm info lifecycle test1@1.0.0~shrinkwrap: test1@1.0.0 npm info lifecycle test1@1.0.0~postshrinkwrap: test1@1.0.0 npm WARN test1@1.0.0 No description npm WARN test1@1.0.0 No repository field.

6 packages are looking for funding run npm fund for details

found 0 vulnerabilities

npm verb exit [ 0, true ] npm timing npm Completed in 31183ms npm info ok `

lovell commented 3 years ago

Thank you, that appears to have installed successfully.

Your next step is to try to work out what filesystem permissions are different when you use an existing directory and/or npm v8, as something relating to one or both will probably be causing this.

thef0under commented 3 years ago

Thank you.

Yes it is installed now, unfortunately when I git push then an error pops: ../src/common.cc:24:10: fatal error: vips/vips8: No such file or directory 24 | #include <vips/vips8>

It is the same error found in the issue n. #1883 and

1882 .

For more reference, the complete error that pops when trying to download sharp from github: sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.11.3/libvips-8.11.3-linux-x64.tar.br remote: sh: 1: prebuild-install: Permission denied remote: make: Entering directory '/tmp/build_55ca93fb/node_modules/sharp/build' remote: CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o remote: AR(target) Release/obj.target/../node-addon-api/nothing.a remote: COPY Release/nothing.a remote: TOUCH Release/obj.target/libvips-cpp.stamp remote: CXX(target) Release/obj.target/sharp-linux-x64/src/common.o remote: ../src/common.cc:24:10: fatal error: vips/vips8: No such file or directory remote: 24 | #include <vips/vips8> compilation terminated. remote: make: *** [sharp-linux-x64.target.mk:139: Release/obj.target/sharp-linux-x64/src/common.o] Error 1 remote: make: Leaving directory '/tmp/build_55ca93fb/node_modules/sharp/build' remote: gyp ERR! build error remote: gyp ERR! stack Error:makefailed with exit code: 2 remote: gyp ERR! stack at ChildProcess.onExit (/tmp/build_55ca93fb/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) remote: gyp ERR! stack at ChildProcess.emit (events.js:400:28) remote: gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:282:12) remote: gyp ERR! System Linux 4.4.0-1097-aws remote: gyp ERR! command "/tmp/build_55ca93fb/.heroku/node/bin/node" "/tmp/build_55ca93fb/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" remote: gyp ERR! cwd /tmp/build_55ca93fb/node_modules/sharp remote: gyp ERR! node -v v14.18.1 remote: gyp ERR! node-gyp -v v5.1.0 remote: gyp ERR! not ok remote: npm ERR! code ELIFECYCLE remote: npm ERR! errno 1 remote: npm ERR! sharp@0.29.2 install:(node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy) remote: npm ERR! Exit status 1 remote: npm ERR! remote: npm ERR! Failed at the sharp@0.29.2 install script.

lovell commented 3 years ago

This error and the original error mention Linux. The successful installation is on Windows. Are you using Windows Subsystem for Linux (WSL)? Please can you provide significantly more context about the Windows vs Linux situation going on here.

(The two previous issues you quote might have similar effects but are unrelated.)

thef0under commented 3 years ago

Yes sure, I am coding on windows but I am using Heroku for fast deployment, Heroku uses an operating system image called stack which is linux based. So when downloading on that operating system the error pops.

Is there another way to include vips/vips8?

lovell commented 3 years ago

Please include this kind of information in your first post when opening issues against open source software.

Please can you re-answer all of the questions I've asked in the context of Heroku rather than Windows. Please provide too much information rather than too little.

thef0under commented 3 years ago

I thought I gave enough information pasting the whole logs into the post.

The output of the issue during the installation is above, unfortunately I can't find any documentation about the filesystem permissions of heroku.

You can close the issue, I am developing a fast tool which does just what I need because it looks like I might need days to solve this issue.

Thank you for all the informations.

lovell commented 3 years ago

Should something like this happen again, the best thing to do is to create minimal, standalone code and config (perhaps as a git repository) that exhibits the behaviour, which will then make it much easier for someone else to reproduce the same behaviour.

A lot of people use sharp with Heroku so there's probably something not quite right about the configuration in this particular case. Good luck!

beita1 commented 2 years ago

I had the same issue the first time when I executed npm i sharp, but the second time I executed npm i -verbose sharp and it installed successfully.

CN91 commented 2 years ago

I am currently running into the same thing. I vendored the build, and the build is now going fine. But when uploaded to the cloud foundry environment the rebuild fails on this exact error.

Even though

NPM_CONFIG_SHARP_INSTALL_FORCE=true
   2022-06-20T13:38:21.54+0200 [STG/0] OUT        NPM_CONFIG_SHARP_LIBVIPS_LOCAL_PREBUILDS=tmp/app/prebuilds
   2022-06-20T13:38:21.54+0200 [STG/0] OUT        NPM_CONFIG_LOGLEVEL=verbose
   2022-06-20T13:38:21.54+0200 [STG/0] OUT        NPM_CONFIG_SHARP_LOCAL_PREBUILDS=tmp/app/prebuilds
   2022-06-20T13:38:21.54+0200 [STG/0] OUT        NPM_CONFIG_TARBALL=tmp/app/prebuilds/node_headers/node-v16.14.2-headers.tar.gz

is provided. However the path while building is different from the path on the cloud foundry environment. Could that be the issue?

beita1 commented 2 years ago

已收到,谢谢