Closed ortonomy closed 3 years ago
If this machine is located in Shanghai then https://sharp.pixelplumbing.com/install#chinese-mirror will help.
No, the machine is located on a scaleway machine in France.
What's the response of running the following command within your CI environment (assumes curl
is available):
curl --verbose https://github.com/lovell/sharp-libvips/releases/download/v8.10.5/libvips-8.10.5-linux-x64.tar.br
I have the same issue. have you managed to find a fix?
Sorry I haven't been able to get around to pushing this to the CI yet @lovell -- I will when our client pays their bill 🤣
@ortonomy Were you able to make any progress with this?
@lovell I'm facing this issue. That is my output when building. Do you need me to include the verbose on the CI to check the output? I made a deployment a few days ago and didn't have any issues, really odd to happen now. I'm thinking to downgrade the Node to something between 14+ that is my limit due some dependencies inside. Currently I am using the latest version of node on the Docker Gitlab CI image.
error /builds/globechain/magna/node_modules/sharp: Command failed.
Exit code: 1
Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
Arguments:
Directory: /builds/globechain/magna/node_modules/sharp
Output:
info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.8.1/libvips-8.8.1-linux-x64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=16.0.0 runtime=node arch=x64 libc= platform=linux)
gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@16.0.0 | linux | x64
gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3"
gyp http GET https://nodejs.org/download/release/v16.0.0/node-v16.0.0-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v16.0.0/node-v16.0.0-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v16.0.0/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v16.0.0/SHASUMS256.txt
(node:182) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use node --trace-deprecation ...
to show where the warning was created)
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/builds/globechain/magna/node_modules/sharp/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/root/.cache/node-gyp/16.0.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/16.0.0',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/16.0.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/builds/globechain/magna/node_modules/sharp',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/builds/globechain/magna/node_modules/sharp/build'
TOUCH Release/obj.target/libvips-cpp.stamp
CXX(target) Release/obj.target/sharp/src/common.o
@cderickstudy Please upgrade sharp (it looks like you're using v0.23.x from ~2 years ago).
@lovell oh yeah saw now. It comes from favicons dependency. I'm not actually using sharp directly. I will try and update here. Thanks o//
In case you cannot upgrade, change this line in node_modules/sharp/binding.gyp
:
'-std=c++0x',
To:
'-std=c++14',
And run npm rebuild
I force the resolution on package.json to use the new version of Sharp and I could install and run, however my node-sass blow due the Node 16. I remove the sharp resolution and downgrade the image in the gitlab CI Docker to node:14
Everything works fine now, so it seems was an issue with Node instead of Sharp.
Thanks for the help anyway :)
@ortonomy Closing due to inactivity but please feel free to reopen with more details if further help is required.
@lovell i have the same problem.
I try command:
curl --verbose https://github.com/lovell/sharp-libvips/releases/download/v8.10.6/libvips-8.10.6-linux-x64.tar.br
this is the output:
Step 7/13 : RUN curl --verbose https://github.com/lovell/sharp-libvips/releases/download/v8.10.6/libvips-8.10.6-linux-x64.tar.br
---> Running in 34ef237ed8bf
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 140.82.121.3...
* TCP_NODELAY set
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to github.com (140.82.121.3) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
} [5 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.2 (IN), TLS handshake, Server hello (2):
{ [70 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [2358 bytes data]
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
{ [147 bytes data]
* TLSv1.2 (IN), TLS handshake, Server finished (14):
{ [4 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
} [70 bytes data]
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
} [1 bytes data]
* TLSv1.2 (OUT), TLS handshake, Finished (20):
} [16 bytes data]
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
{ [1 bytes data]
* TLSv1.2 (IN), TLS handshake, Finished (20):
{ [16 bytes data]
* SSL connection using TLSv1.2 / ECDHE-ECDSA-AES128-GCM-SHA256
* ALPN, server accepted to use h2
* Server certificate:
* subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=github.com
* start date: Mar 25 00:00:00 2021 GMT
* expire date: Mar 30 23:59:59 2022 GMT
* subjectAltName: host "github.com" matched cert's "github.com"
* issuer: C=US; O=DigiCert, Inc.; CN=DigiCert High Assurance TLS Hybrid ECC SHA256 2020 CA1
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
} [5 bytes data]
* Using Stream ID: 1 (easy handle 0x55b7e3713e00)
} [5 bytes data]
> GET /lovell/sharp-libvips/releases/download/v8.10.6/libvips-8.10.6-linux-x64.tar.br HTTP/1.1
> Host: github.com
> User-Agent: curl/7.52.1
> Accept: */*
>
{ [5 bytes data]
* Connection state changed (MAX_CONCURRENT_STREAMS updated)!
} [5 bytes data]
< HTTP/2 302
< server: GitHub.com
< date: Fri, 23 Jul 2021 08:46:08 GMT
< content-type: text/html; charset=utf-8
< vary: X-PJAX, Accept-Encoding, Accept, X-Requested-With
< permissions-policy: interest-cohort=()
< location: https://github-releases.githubusercontent.com/104502835/9a8c3900-8e79-11eb-9c21-0f95650972c0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210723%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210723T084608Z&X-Amz-Expires=300&X-Amz-Signature=086d2bcdc8d34cbb84bd922b624d5749ef26614d1c988d8ae5736b18cefaba9c&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=104502835&response-content-disposition=attachment%3B%20filename%3Dlibvips-8.10.6-linux-x64.tar.br&response-content-type=application%2Foctet-stream
< cache-control: no-cache
< strict-transport-security: max-age=31536000; includeSubdomains; preload
< x-frame-options: deny
< x-content-type-options: nosniff
< x-xss-protection: 0
< referrer-policy: no-referrer-when-downgrade
< expect-ct: max-age=2592000, report-uri="https://api.github.com/_private/browser/errors"
< content-security-policy: default-src 'none'; base-uri 'self'; block-all-mixed-content; connect-src 'self' uploads.github.com www.githubstatus.com collector.githubapp.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com cdn.optimizely.com logx.optimizely.com/v1/events translator.github.com wss://alive.github.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com online.visualstudio.com/api/v1/locations insights.github.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com; frame-ancestors 'none'; frame-src render.githubusercontent.com render-temp.githubusercontent.com viewscreen.githubusercontent.com; img-src 'self' data: github.githubassets.com identicons.github.com collector.githubapp.com github-cloud.s3.amazonaws.com secured-user-images.githubusercontent.com/ *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; worker-src github.com/socket-worker-3f088aa2.js gist.github.com/socket-worker-3f088aa2.js
< content-length: 639
< x-github-request-id: 2644:51AB:2FCD4E0:31B4B2B:60FA81D0
<
{ [425 bytes data]
* Curl_http_done: called premature == 0
100 639 100 639 0 0 1110 0 --:--:-- --:--:-- --:--:-- 1117
* Connection #0 to host github.com left intact
<html><body>You are being <a href="https://github-releases.githubusercontent.com/104502835/9a8c3900-8e79-11eb-9c21-0f95650972c0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210723%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210723T084608Z&X-Amz-Expires=300&X-Amz-Signature=086d2bcdc8d34cbb84bd922b624d5749ef26614d1c988d8ae5736b18cefaba9c&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=104502835&response-content-disposition=attachment%3B%20filename%3Dlibvips-8.10.6-linux-x64.tar.br&response-content-type=application%2Foctet-stream">redirected</a>.</body></html>Removing intermediate container 34ef237ed8bf
---> e6ef92ba19ad
Step 8/13 : RUN npm install --unsafe-perm
...
> yarn@1.22.10 preinstall /app/node_modules/yarn
> :; (node ./preinstall.js > /dev/null 2>&1 || true)
> pprof@3.2.0 install /app/node_modules/pprof
> node-pre-gyp install --fallback-to-build
[pprof] Success: "/app/node_modules/pprof/build/node-v83-linux-x64-glibc/pprof.node" is installed via remote
> sharp@0.28.3 install /app/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.6/libvips-8.10.6-linux-x64.tar.br
Issue
CI install fails at this line:
my dockerfile
It builds fine on my MacOS laptop. CI always fails. It's inside Docker, so it shouldn't matter.
Required info
Yes
npm install
is the same as the architecture and platform of Node.js used at runtime?Yes
npm ls sharp
the same as the latest version as reported bynpm view sharp dist-tags.latest
?N/A
root
orsudo
user, have you tried with thenpm install --unsafe-perm
flag?Yes
npm install
own the directory it is run in?N/A
ignore-scripts
feature ofnpm
, have you tried with thenpm install --ignore-scripts=false
flag?N/A
npm install --verbose sharp
? Have you checked this output for useful error messages?npx envinfo --binaries --system
?