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

nanoserver: require("sharp") exit with code 4294967295 #3175

Closed
3 tasks done
tgckpg opened this issue Apr 2, 2022 · 6 comments
Closed
3 tasks done

nanoserver: require("sharp") exit with code 4294967295 #3175

tgckpg opened this issue Apr 2, 2022 · 6 comments

Comments

@tgckpg
Copy link

tgckpg commented Apr 2, 2022

Possible install-time or require-time problem

  • I have read the documentation relating to installation.
  • I have ensured that the architecture and platform of Node.js used for npm install is the same as the architecture and platform of Node.js used at runtime.

Are you using the latest version of sharp?

  • 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.

Is this a problem with filesystem permissions?

If you are using npm v6 or earlier and installing as a root or sudo user, have you tried with the npm install --unsafe-perm flag?

If you are using npm v7 or later, does the user running npm install own the directory it is run in?

If you are using the ignore-scripts feature of npm, have you tried with the npm install --ignore-scripts=false flag?

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

npm verb cli [
npm verb cli   'C:\\NodeJS\\node.exe',
npm verb cli   'C:\\NodeJS\\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@8.5.0
npm info using node@v16.14.2
npm timing npm:load:whichnode Completed in 1ms
npm timing config:load:defaults Completed in 4ms
npm timing config:load:file:C:\NodeJS\node_modules\npm\npmrc Completed in 3ms
npm timing config:load:builtin Completed in 3ms
npm timing config:load:cli Completed in 6ms
npm timing config:load:env Completed in 1ms
npm timing config:load:file:C:\App\.npmrc Completed in 0ms
npm timing config:load:project Completed in 16ms
npm timing config:load:file:C:\Users\ContainerUser\.npmrc Completed in 3ms
npm timing config:load:user Completed in 4ms
npm timing config:load:file:C:\App\node_modules\etc\npmrc Completed in 1ms
npm timing config:load:global Completed in 1ms
npm timing config:load:validate Completed in 0ms
npm timing config:load:credentials Completed in 2ms
npm timing config:load:setEnvs Completed in 2ms
npm timing config:load Completed in 41ms
npm timing npm:load:configload Completed in 41ms
npm timing npm:load:setTitle Completed in 1ms
npm timing config:load:flatten Completed in 7ms
npm timing npm:load:display Completed in 14ms
npm verb logfile C:\Users\ContainerUser\AppData\Local\npm-cache\_logs\2022-04-02T11_47_13_834Z-debug-0.log
npm timing npm:load:logFile Completed in 36ms
npm timing npm:load:timers Completed in 0ms
npm timing npm:load:configScope Completed in 0ms
npm timing npm:load Completed in 94ms
npm timing arborist:ctor Completed in 2ms
npm timing arborist:ctor Completed in 0ms
npm timing idealTree:init Completed in 26ms
npm timing idealTree:userRequests Completed in 7ms
npm http fetch GET 200 https://registry.npmjs.org/sharp 181ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/color 141ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/detect-libc 232ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/tar-fs 231ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/semver 235ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/node-addon-api 241ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/prebuild-install 242ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/simple-get 243ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/tunnel-agent 243ms (cache miss)
npm timing idealTree:#root Completed in 464ms
npm http fetch GET 200 https://registry.npmjs.org/node-abi 184ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/color-convert 195ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/mkdirp-classic 188ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/minimist 192ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/color-string 199ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/github-from-package 199ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/napi-build-utils 200ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/npmlog 200ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/chownr 190ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/safe-buffer 202ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/expand-template 246ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/tar-stream 232ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/once 256ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/simple-concat 255ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/pump 271ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/rc 273ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/lru-cache 273ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/decompress-response 276ms (cache miss)
npm timing idealTree:node_modules/sharp Completed in 339ms
npm http fetch GET 200 https://registry.npmjs.org/simple-swizzle 83ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/color-name 111ms (cache miss)
npm timing idealTree:node_modules/color Completed in 123ms
npm timing idealTree:node_modules/color-convert Completed in 5ms
npm timing idealTree:node_modules/color-name Completed in 0ms
npm http fetch GET 200 https://registry.npmjs.org/is-arrayish 57ms (cache miss)
npm timing idealTree:node_modules/color-string Completed in 65ms
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/are-we-there-yet 119ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/set-blocking 118ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/strip-json-comments 118ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/ini 126ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/end-of-stream 133ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/console-control-strings 144ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/gauge 152ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/deep-extend 3454ms (cache miss)
npm timing idealTree:node_modules/prebuild-install Completed in 3488ms
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/minimist 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 0ms
npm http fetch GET 200 https://registry.npmjs.org/wide-align 147ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/strip-ansi 150ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/signal-exit 156ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/has-unicode 161ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/string-width 158ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/aproba 168ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/object-assign 168ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/readable-stream 178ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/delegates 186ms (cache miss)
npm timing idealTree:node_modules/npmlog Completed in 198ms
npm http fetch GET 200 https://registry.npmjs.org/core-util-is 103ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/string_decoder 99ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/process-nextick-args 106ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/isarray 115ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/util-deprecate 117ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/inherits 137ms (cache miss)
npm timing idealTree:node_modules/are-we-there-yet Completed in 149ms
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/code-point-at 66ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/is-fullwidth-code-point 74ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/ansi-regex 89ms (cache miss)
npm timing idealTree:node_modules/gauge Completed in 114ms
npm timing idealTree:node_modules/aproba Completed in 0ms
npm timing idealTree:node_modules/has-unicode Completed in 0ms
npm timing idealTree:node_modules/object-assign Completed in 0ms
npm http fetch GET 200 https://registry.npmjs.org/wrappy 75ms (cache miss)
npm timing idealTree:node_modules/pump Completed in 88ms
npm timing idealTree:node_modules/end-of-stream Completed in 0ms
npm timing idealTree:node_modules/once Completed in 3ms
npm timing idealTree:node_modules/rc Completed in 9ms
npm timing idealTree:node_modules/deep-extend Completed in 0ms
npm timing idealTree:node_modules/ini Completed in 0ms
npm timing idealTree:node_modules/readable-stream Completed in 24ms
npm timing idealTree:node_modules/core-util-is Completed in 0ms
npm timing idealTree:node_modules/inherits Completed in 0ms
npm timing idealTree:node_modules/isarray Completed in 0ms
npm timing idealTree:node_modules/process-nextick-args Completed in 0ms
npm timing idealTree:node_modules/safe-buffer Completed in 0ms
npm http fetch GET 200 https://registry.npmjs.org/yallist 64ms (cache miss)
npm timing idealTree:node_modules/semver Completed in 69ms
npm timing idealTree:node_modules/lru-cache Completed in 9ms
npm timing idealTree:node_modules/set-blocking Completed in 0ms
npm timing idealTree:node_modules/signal-exit Completed in 0ms
npm http fetch GET 200 https://registry.npmjs.org/mimic-response 75ms (cache miss)
npm timing idealTree:node_modules/simple-get Completed in 84ms
npm timing idealTree:node_modules/decompress-response Completed in 3ms
npm timing idealTree:node_modules/mimic-response Completed in 0ms
npm timing idealTree:node_modules/simple-concat Completed in 0ms
npm timing idealTree:node_modules/simple-swizzle Completed in 3ms
npm timing idealTree:node_modules/is-arrayish Completed in 0ms
npm timing idealTree:node_modules/string_decoder Completed in 1ms
npm http fetch GET 200 https://registry.npmjs.org/number-is-nan 63ms (cache miss)
npm timing idealTree:node_modules/string-width Completed in 74ms
npm timing idealTree:node_modules/code-point-at Completed in 0ms
npm timing idealTree:node_modules/is-fullwidth-code-point Completed in 6ms
npm timing idealTree:node_modules/number-is-nan Completed in 0ms
npm timing idealTree:node_modules/strip-ansi Completed in 2ms
npm timing idealTree:node_modules/ansi-regex Completed in 0ms
npm timing idealTree:node_modules/strip-json-comments Completed in 0ms
npm http fetch GET 200 https://registry.npmjs.org/bl 73ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/fs-constants 74ms (cache miss)
npm timing idealTree:node_modules/tar-fs Completed in 84ms
npm timing idealTree:node_modules/chownr Completed in 0ms
npm http fetch GET 200 https://registry.npmjs.org/buffer 69ms (cache miss)
npm timing idealTree:node_modules/tar-stream Completed in 91ms
npm http fetch GET 200 https://registry.npmjs.org/base64-js 64ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/ieee754 68ms (cache miss)
npm timing idealTree:node_modules/bl Completed in 80ms
npm timing idealTree:node_modules/buffer Completed in 6ms
npm timing idealTree:node_modules/base64-js Completed in 0ms
npm timing idealTree:node_modules/fs-constants Completed in 0ms
npm timing idealTree:node_modules/ieee754 Completed in 0ms
npm timing idealTree:node_modules/tunnel-agent Completed in 0ms
npm timing idealTree:node_modules/util-deprecate Completed in 0ms
npm timing idealTree:node_modules/wide-align Completed in 0ms
npm timing idealTree:node_modules/wrappy Completed in 1ms
npm timing idealTree:node_modules/yallist Completed in 0ms
npm timing idealTree:node_modules/bl/node_modules/readable-stream Completed in 0ms
npm timing idealTree:node_modules/tar-stream/node_modules/readable-stream Completed in 0ms
npm timing idealTree:buildDeps Completed in 5622ms
npm timing idealTree:fixDepFlags Completed in 5ms
npm timing idealTree Completed in 5668ms
npm timing reify:loadTrees Completed in 5670ms
npm timing reify:diffTrees Completed in 7ms
npm timing reify:retireShallow Completed in 4ms
npm timing reify:createSparse Completed in 64ms
npm timing reify:loadBundles Completed in 0ms
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 1004ms
npm timing auditReport:getReport Completed in 1010ms
npm timing auditReport:init Completed in 0ms
npm timing reify:audit Completed in 1013ms
npm http fetch GET 200 https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz 1457ms (cache miss)
npm timing reifyNode:node_modules/ieee754 Completed in 1548ms
npm http fetch GET 200 https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz 1251ms (cache miss)
npm timing reifyNode:node_modules/process-nextick-args Completed in 1560ms
npm http fetch GET 200 https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz 1455ms (cache miss)
npm timing reifyNode:node_modules/chownr Completed in 1580ms
npm http fetch GET 200 https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz 1371ms (cache miss)
npm timing reifyNode:node_modules/decompress-response Completed in 1593ms
npm http fetch GET 200 https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz 1197ms (cache miss)
npm timing reifyNode:node_modules/wrappy Completed in 1620ms
npm http fetch GET 200 https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz 1301ms (cache miss)
npm timing reifyNode:node_modules/inherits Completed in 1628ms
npm http fetch GET 200 https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz 1305ms (cache miss)
npm timing reifyNode:node_modules/core-util-is Completed in 1642ms
npm http fetch GET 200 https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz 1338ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz 1443ms (cache miss)
npm timing reifyNode:node_modules/util-deprecate Completed in 1706ms
npm http fetch GET 200 https://registry.npmjs.org/once/-/once-1.4.0.tgz 1368ms (cache miss)
npm timing reifyNode:node_modules/once Completed in 1729ms
npm http fetch GET 200 https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz 1366ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz 1306ms (cache miss)
npm timing reifyNode:node_modules/wide-align Completed in 1745ms
npm http fetch GET 200 https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz 1297ms (cache miss)
npm timing reifyNode:node_modules/object-assign Completed in 1762ms
npm http fetch GET 200 https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz 1330ms (cache miss)
npm timing reifyNode:node_modules/string-width Completed in 1777ms
npm http fetch GET 200 https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz 1360ms (cache miss)
npm timing reifyNode:node_modules/strip-ansi Completed in 1788ms
npm http fetch GET 200 https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz 1326ms (cache miss)
npm timing reifyNode:node_modules/has-unicode Completed in 1799ms
npm http fetch GET 200 https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz 1330ms (cache miss)
npm timing reifyNode:node_modules/aproba Completed in 1813ms
npm http fetch GET 200 https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz 1332ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz 1176ms (cache miss)
npm timing reifyNode:node_modules/color-name Completed in 1844ms
npm http fetch GET 200 https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz 1217ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/color-string/-/color-string-1.9.0.tgz 1205ms (cache miss)
npm timing reifyNode:node_modules/color-string Completed in 1888ms
npm timing reifyNode:node_modules/deep-extend Completed in 1895ms
npm http fetch GET 200 https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz 1305ms (cache miss)
npm timing reifyNode:node_modules/mkdirp-classic Completed in 1905ms
npm http fetch GET 200 https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz 1355ms (cache miss)
npm timing reifyNode:node_modules/set-blocking Completed in 1921ms
npm http fetch GET 200 https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz 1288ms (cache miss)
npm timing reifyNode:node_modules/isarray Completed in 1953ms
npm timing reifyNode:node_modules/expand-template Completed in 1951ms
npm http fetch GET 200 https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz 1817ms (cache miss)
npm timing reifyNode:node_modules/ansi-regex Completed in 1981ms
npm http fetch GET 200 https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz 1899ms (cache miss)
npm timing reifyNode:node_modules/base64-js Completed in 1994ms
npm http fetch GET 200 https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz 1466ms (cache miss)
npm timing reifyNode:node_modules/console-control-strings Completed in 1999ms
npm http fetch GET 200 https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz 1664ms (cache miss)
npm timing reifyNode:node_modules/strip-json-comments Completed in 2007ms
npm http fetch GET 200 https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz 1928ms (cache miss)
npm timing reifyNode:node_modules/fs-constants Completed in 2028ms
npm http fetch GET 200 https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz 1860ms (cache miss)
npm timing reifyNode:node_modules/mimic-response Completed in 2069ms
npm http fetch GET 200 https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz 1841ms (cache miss)
npm timing reifyNode:node_modules/lru-cache Completed in 2084ms
npm http fetch GET 200 https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz 1706ms (cache miss)
npm timing reifyNode:node_modules/end-of-stream Completed in 2096ms
npm timing reifyNode:node_modules/delegates Completed in 2108ms
npm http fetch GET 200 https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz 1952ms (cache miss)
npm timing reifyNode:node_modules/number-is-nan Completed in 2123ms
npm http fetch GET 200 https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz 1961ms (cache miss)
npm timing reifyNode:node_modules/is-fullwidth-code-point Completed in 2140ms
npm http fetch GET 200 https://registry.npmjs.org/ini/-/ini-1.3.8.tgz 1798ms (cache miss)
npm timing reifyNode:node_modules/ini Completed in 2152ms
npm http fetch GET 200 https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz 1929ms (cache miss)
npm timing reifyNode:node_modules/yallist Completed in 2162ms
npm http fetch GET 200 https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz 1981ms (cache miss)
npm timing reifyNode:node_modules/code-point-at Completed in 2172ms
npm http fetch GET 200 https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz 1916ms (cache miss)
npm timing reifyNode:node_modules/string_decoder Completed in 2208ms
npm http fetch GET 200 https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz 1770ms (cache miss)
npm timing reifyNode:node_modules/signal-exit Completed in 2226ms
npm http fetch GET 200 https://registry.npmjs.org/pump/-/pump-3.0.0.tgz 1667ms (cache miss)
npm timing reifyNode:node_modules/pump Completed in 2240ms
npm http fetch GET 200 https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz 1456ms (cache miss)
npm timing reifyNode:node_modules/simple-swizzle Completed in 2254ms
npm http fetch GET 200 https://registry.npmjs.org/color/-/color-4.2.1.tgz 1381ms (cache miss)
npm timing reifyNode:node_modules/color Completed in 2281ms
npm http fetch GET 200 https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz 2001ms (cache miss)
npm timing reifyNode:node_modules/safe-buffer Completed in 2300ms
npm http fetch GET 200 https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz 1609ms (cache miss)
npm timing reifyNode:node_modules/tunnel-agent Completed in 2309ms
npm http fetch GET 200 https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz 2125ms (cache miss)
npm timing reifyNode:node_modules/simple-concat Completed in 2340ms
npm http fetch GET 200 https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz 1583ms (cache miss)
npm timing reifyNode:node_modules/detect-libc Completed in 2342ms
npm http fetch GET 200 https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz 1702ms (cache miss)
npm timing reifyNode:node_modules/color-convert Completed in 2379ms
npm http fetch GET 200 https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz 2283ms (cache miss)
npm timing reifyNode:node_modules/tar-stream Completed in 2395ms
npm http fetch GET 200 https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz 2324ms (cache miss)
npm timing reifyNode:node_modules/buffer Completed in 2413ms
npm http fetch GET 200 https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz 1784ms (cache miss)
npm timing reifyNode:node_modules/npmlog Completed in 2418ms
npm http fetch GET 200 https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz 2251ms (cache miss)
npm timing reifyNode:node_modules/is-arrayish Completed in 2448ms
npm http fetch GET 200 https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz 1706ms (cache miss)
npm timing reifyNode:node_modules/simple-get Completed in 2459ms
npm http fetch GET 200 https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz 1926ms (cache miss)
npm timing reifyNode:node_modules/are-we-there-yet Completed in 2482ms
npm timing reifyNode:node_modules/github-from-package Completed in 2538ms
npm http fetch GET 200 https://registry.npmjs.org/bl/-/bl-4.1.0.tgz 2453ms (cache miss)
npm timing reifyNode:node_modules/bl Completed in 2556ms
npm http fetch GET 200 https://registry.npmjs.org/node-abi/-/node-abi-3.8.0.tgz 2014ms (cache miss)
npm timing reifyNode:node_modules/node-abi Completed in 2596ms
npm http fetch GET 200 https://registry.npmjs.org/rc/-/rc-1.2.8.tgz 2059ms (cache miss)
npm timing reifyNode:node_modules/rc Completed in 2608ms
npm http fetch GET 200 https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.0.1.tgz 1915ms (cache miss)
npm timing reifyNode:node_modules/prebuild-install Completed in 2641ms
npm http fetch GET 200 https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz 2007ms (cache miss)
npm timing reifyNode:node_modules/tar-fs Completed in 2709ms
npm http fetch GET 200 https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz 2078ms (cache miss)
npm timing reifyNode:node_modules/minimist Completed in 2728ms
npm http fetch GET 200 https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz 2058ms (cache miss)
npm timing reifyNode:node_modules/node-addon-api Completed in 2826ms
npm http fetch GET 200 https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz 2369ms (cache miss)
npm timing reifyNode:node_modules/readable-stream Completed in 2860ms
npm http fetch GET 200 https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz 2093ms (cache miss)
npm timing reifyNode:node_modules/tar-stream/node_modules/readable-stream Completed in 2877ms
npm http fetch GET 200 https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz 2096ms (cache miss)
npm timing reifyNode:node_modules/bl/node_modules/readable-stream Completed in 2889ms
npm http fetch GET 200 https://registry.npmjs.org/semver/-/semver-7.3.5.tgz 2270ms (cache miss)
npm timing reifyNode:node_modules/semver Completed in 2980ms
npm http fetch GET 200 https://registry.npmjs.org/sharp/-/sharp-0.30.3.tgz 2111ms (cache miss)
npm timing reifyNode:node_modules/sharp Completed in 3021ms
npm http fetch GET 200 https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz 4046ms (cache miss)
npm timing reifyNode:node_modules/napi-build-utils Completed in 4637ms
npm http fetch GET 200 https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz 4148ms (cache miss)
npm timing reifyNode:node_modules/gauge Completed in 4690ms
npm timing reify:unpack Completed in 4695ms
npm timing reify:unretire Completed in 1ms
npm timing build:queue Completed in 16ms
npm timing build:link:node_modules/prebuild-install Completed in 21ms
npm timing build:link:node_modules/rc Completed in 19ms
npm timing build:link:node_modules/semver Completed in 20ms
npm timing build:link Completed in 23ms
npm info run sharp@0.30.3 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 info run sharp@0.30.3 install { code: 0, signal: null }
npm timing build:run:install:node_modules/sharp Completed in 8695ms
npm timing build:run:install Completed in 8697ms
npm timing build:deps Completed in 8737ms
npm timing build Completed in 8737ms
npm timing reify:build Completed in 8738ms
npm timing reify:trash Completed in 0ms
npm timing reify:save Completed in 33ms
npm timing reify Completed in 19330ms

added 67 packages, and audited 68 packages in 21s

8 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

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

npm timing command:install Completed in 19343ms
npm notice
npm notice New minor version of npm available! 8.5.0 -> 8.6.0
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.6.0>
npm notice Run `npm install -g npm@8.6.0` to update!
npm notice
npm verb exit 0
npm timing npm Completed in 21181ms
npm info ok
npm WARN exec The following package was not found and will be installed: envinfo
C:\Users\ContainerUser\AppData\Local\npm-cache\_npx\e8a92db577883955\node_modules\envinfo\dist\envinfo.js:1
module.exports=<MINIFIED_SCRIPT>








Error: Command failed: wmic os get Caption
'wmic' is not recognized as an internal or external command,
operable program or batch file.


    at b (C:\Users\ContainerUser\AppData\Local\npm-cache\_npx\e8a92db577883955\node_modules\envinfo\dist\envinfo.js:1:95303)
    at Function.e.exports.sync (C:\Users\ContainerUser\AppData\Local\npm-cache\_npx\e8a92db577883955\node_modules\envinfo\dist\envinfo.js:1:97166)
    at e.exports (C:\Users\ContainerUser\AppData\Local\npm-cache\_npx\e8a92db577883955\node_modules\envinfo\dist\envinfo.js:1:93520)
    at e.exports (C:\Users\ContainerUser\AppData\Local\npm-cache\_npx\e8a92db577883955\node_modules\envinfo\dist\envinfo.js:1:92667)
    at C:\Users\ContainerUser\AppData\Local\npm-cache\_npx\e8a92db577883955\node_modules\envinfo\dist\envinfo.js:1:91417
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Promise.all (index 0) {
  code: 1,
  stdout: '',
  stderr: "'wmic' is not recognized as an internal or external command,\r\n" +
    'operable program or batch file.\r\n',
  failed: true,
  signal: null,
  cmd: 'wmic os get Caption',
  timedOut: false
}

Dockerfile

FROM mcr.microsoft.com/powershell:nanoserver-1903

SHELL [ "pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';" ]

RUN [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12; \
    Invoke-WebRequest -UseBasicParsing -Uri 'https://nodejs.org/dist/v16.14.2/node-v16.14.2-win-x64.zip' -OutFile '/nodejs.zip' ; \
    Invoke-WebRequest 'https://github.com/git-for-windows/git/releases/download/v2.35.1.windows.2/MinGit-2.35.1.2-busybox-64-bit.zip' -OutFile '/MinGit.zip' ; \
    Expand-Archive /nodejs.zip -dest / ; \
    Expand-Archive /MinGit.zip -dest /git; \
    Remove-Item nodejs.zip -Force; \
    Remove-Item MinGit.zip -Force; \
    Move-Item node-*-win-x64 NodeJS;

User ContainerAdministrator
RUN setx Path  "C:\git\cmd`;C:\NodeJS`;$Env:Path" /M;

User ContainerUser

RUN mkdir /App
WORKDIR /App

RUN npm config set prefix '/App/node_modules'; \
    npm install --verbose sharp;

RUN node -e \"console.log('hello')\"; \
    node -e \"console.log(require('sharp'))\";

Error Message

The command 'pwsh -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; node -e "console.log('hello')"; node -e "console.log(require('sharp'))";' returned a non-zero code: 4294967295: failed to shutdown container: container d17da3bf922b565b9cf7c95b3b62eed11619dd32558073f9a9c913b9832f5498 encountered an error during hcsshim::System::Shutdown: failure in a Windows system call: The connection with the virtual machine or container was closed. (0xc037010a): subsequent terminate failed container d17da3bf922b565b9cf7c95b3b62eed11619dd32558073f9a9c913b9832f5498 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The connection with the virtual machine or container was closed. (0xc037010a)

@lovell
Copy link
Owner

lovell commented Apr 2, 2022

Are you able to get a backtrace of the crash? Perhaps you need to grant additional privileges or permissions to the runtime environment.

@tgckpg
Copy link
Author

tgckpg commented Apr 2, 2022

Sorry I do not know how to get the backtrace. Using ContainerAdministrator result in the same exit code. I suspect this might be to do with some missing libraries?

@lovell
Copy link
Owner

lovell commented Apr 2, 2022

I don't have access to Windows hardware to help debug this but hopefully someone else using the same bleeding-edge setup can help. As you say, it's likely there's something missing as nanoserver provides a minimal environment.

@lovell lovell changed the title require("sharp") will just exit with code 4294967295 under nanoserver nanoserver: require("sharp") exit with code 4294967295 Apr 2, 2022
@tgckpg
Copy link
Author

tgckpg commented Apr 2, 2022

After some googling I think this maybe something with gdi32.dll, since nanoserver do not have 32bit environment so maybe it's just incompatible to run sharp here.

@kleisauke
Copy link
Contributor

The libvips Windows binaries no longer link against GDI32.dll after the v8.9.2 release to ensure compatibility with Nano Server. See: kleisauke/net-vips#61 (comment).

I could not reproduce this using this Dockerfile:

Details
FROM mcr.microsoft.com/powershell:nanoserver-20h2

ARG NODE_VERSION=16.14.2

SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

WORKDIR /build

ADD https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-win-x64.zip node-v${NODE_VERSION}-win-x64.zip

RUN Expand-Archive node-v$env:NODE_VERSION-win-x64.zip $env:ProgramFiles; \
    Rename-Item $env:ProgramFiles\node-v$env:NODE_VERSION-win-x64 nodejs; \
    Remove-Item node-v$env:NODE_VERSION-win-x64.zip;

USER ContainerAdministrator
RUN setx PATH $($env:PATH + \";$env:ProgramFiles\nodejs\") /M

USER ContainerUser

WORKDIR /app

RUN npm install --verbose sharp; \
    node -p \"require('sharp')\"

ADD https://wsrv.nl/zebra.jpg zebra.jpg

RUN node -e \"require('sharp')('zebra.jpg').toFile('x.png')\"

@tgckpg
Copy link
Author

tgckpg commented Apr 4, 2022

Thanks, upgrading to 20h2 does work. It's just 1903 having a stroking right now.

Closed as this can be solved by updating windows.

@tgckpg tgckpg closed this as completed Apr 4, 2022
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

3 participants