sharp icon indicating copy to clipboard operation
sharp copied to clipboard

installation error

Open shweta-chalageri opened this issue 3 years ago • 8 comments

Possible install-time or require-time problem

  • [x ] I have read the documentation relating to installation.
  • [ x] 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?

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

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

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

Is this a problem with filesystem permissions?

No 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 --foreground-scripts sharp in an empty directory?

PS E:\rendering\nodeapp> npm install --verbose --foreground-scripts sharp 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:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', npm verb cli 'install', npm verb cli '--verbose', npm verb cli '--foreground-scripts', npm verb cli 'sharp' npm verb cli ] npm info using [email protected] npm info using [email protected] npm verb npm-session 927cea72f2c94803 npm http fetch GET 304 https://registry.npmjs.org/sharp 1190ms (from cache) npm timing stage:loadCurrentTree Completed in 3135ms npm timing stage:loadIdealTree:cloneCurrentTree Completed in 4ms npm timing stage:loadIdealTree:loadShrinkwrap Completed in 635ms npm http fetch GET 304 https://registry.npmjs.org/prebuild-install 75ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/tunnel-agent 99ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/simple-get 107ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/node-addon-api 119ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/detect-libc 129ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/color 132ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/semver 137ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/color-string 49ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/color-convert 53ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/color-name 40ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/simple-swizzle 102ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/is-arrayish 42ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/github-from-package 65ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/minimist 76ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/expand-template 85ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/rc 86ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/node-abi 89ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/napi-build-utils 98ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/lru-cache 49ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/yallist 33ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/deep-extend 43ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/strip-json-comments 45ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/ini 50ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/decompress-response 57ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/simple-concat 102ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/mimic-response 42ms (from cache) npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 1705ms npm timing stage:loadIdealTree Completed in 2544ms npm timing stage:generateActionsToTake Completed in 41ms npm verb correctMkdir C:\Users\Administrator\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\Administrator\AppData\Roaming\npm-cache_locks\staging-52a55f18c22b2769.lock for E:\renderi ng\nodeapp\node_modules.staging npm timing audit submit Completed in 322ms npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 323ms npm timing audit body Completed in 1ms npm timing action:extract Completed in 736ms npm info lifecycle [email protected]~preuninstall: [email protected] npm info lifecycle [email protected]~uninstall: [email protected] npm verb unbuild rmStuff [email protected] from E:\rendering\nodeapp\node_modules npm info lifecycle [email protected]~postuninstall: [email protected] npm timing action:unbuild Completed in 6ms npm timing action:remove Completed in 532ms npm timing action:finalize Completed in 2ms npm timing action:refresh-package-json Completed in 12ms npm info lifecycle [email protected]~preinstall: [email protected] npm timing action:preinstall Completed in 1ms npm info linkStuff [email protected] npm timing action:build Completed in 1ms npm info lifecycle [email protected]~install: [email protected]

[email protected] install E:\rendering\nodeapp\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://npmmirror.com/mirrors/sharp-libvips/v8.12.2/libvips-8.12.2-win32-x64.tar.br sharp: Integrity check passed for win32-x64 sharp: Creating E:\rendering\nodeapp\node_modules\sharp\build\Release sharp: Copying DLLs from E:\rendering\nodeapp\node_modules\sharp\vendor\8.12.2\win32-x64\lib to E:\rendering\nodeapp\nod e_modules\sharp\build\Release prebuild-install info begin Prebuild-install version 7.1.1 prebuild-install info looking for local prebuild @ prebuilds\sharp-v0.30.7-napi-v5-win32-x64.tar.gz prebuild-install info looking for cached prebuild @ C:\Users\Administrator\AppData\Roaming\npm-cache_prebuilds\cc9cf8-s harp-v0.30.7-napi-v5-win32-x64.tar.gz prebuild-install info found cached prebuild prebuild-install info unpacking @ C:\Users\Administrator\AppData\Roaming\npm-cache_prebuilds\cc9cf8-sharp-v0.30.7-napi- v5-win32-x64.tar.gz prebuild-install info unpack resolved to E:\rendering\nodeapp\node_modules\sharp\build\Release\sharp-win32-x64.node prebuild-install info install Successfully installed prebuilt binary! npm verb lifecycle [email protected]~install: unsafe-perm in lifecycle true npm verb lifecycle [email protected]~install: PATH: C:\Users\Administrator\AppData\Roaming\nvm\v12.19.0\node_modules\npm\node modules\npm-lifecycle\node-gyp-bin;E:\rendering\nodeapp\node_modules\sharp\node_modules.bin;E:\rendering\nodeapp\node modules.bin;%SystemRoot%\system32\WindowsPowerShell\v1.0;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;c:\Pr ogram Files (x86)\Microsoft SQL Server\100\Tools\Binn;c:\Program Files\Microsoft SQL Server\100\Tools\Binn;c:\Program Files\Microsoft SQL Server\100\DTS\Binn;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE
;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\MySQL\MySQL Server 5.0\bin;C:\Program Files (x86)\Amazon\AWSCLI;C:\Program Files\Git\cmd;%NVM_HOME%;%NVM_SYMLINK% ;C:\Users\Administrator\AppData\Roaming\npm;C:\Users\Administrator\AppData\Roaming\nvm;C:\Program Files\nodejs npm verb lifecycle [email protected]~install: CWD: E:\rendering\nodeapp\node_modules\sharp npm timing action:install Completed in 6487ms npm info lifecycle [email protected]~postinstall: [email protected] npm timing action:postinstall Completed in 1ms npm verb unlock done using C:\Users\Administrator\AppData\Roaming\npm-cache_locks\staging-52a55f18c22b2769.lock for E:
rendering\nodeapp\node_modules.staging npm timing stage:executeActions Completed in 7810ms npm timing stage:rollbackFailedOptional Completed in 0ms npm timing stage:runTopLevelLifecycles Completed in 13657ms npm verb saving [ { name: 'sharp', spec: '^0.30.7', save: 'dependencies' } ] npm verb shrinkwrap skipping write for package.json because there were no changes. npm info lifecycle undefined~preshrinkwrap: undefined npm info lifecycle [email protected]~shrinkwrap: [email protected] npm verb shrinkwrap skipping write for package-lock.json because there were no changes. npm info lifecycle [email protected]~postshrinkwrap: [email protected] npm WARN [email protected] requires a peer of react@>=16.8 but none is installed. You must install peer dependencies yo urself. npm WARN [email protected] No description npm WARN [email protected] No repository field.

17 packages are looking for funding run npm fund for details

found 4 high severity vulnerabilities run npm audit fix to fix them, or npm audit for details npm verb exit [ 0, true ] npm timing npm Completed in 15741ms npm info ok

PS E:\rendering\nodeapp> npm install --verbose --foreground-scripts sharp 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:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', npm verb cli 'install', npm verb cli '--verbose', npm verb cli '--foreground-scripts', npm verb cli 'sharp' npm verb cli ] npm info using [email protected] npm info using [email protected] npm verb npm-session 7bcc2fd91407dfba npm http fetch GET 304 https://registry.npmjs.org/sharp 148ms (from cache) npm timing stage:loadCurrentTree Completed in 990ms npm timing stage:loadIdealTree:cloneCurrentTree Completed in 4ms npm timing stage:loadIdealTree:loadShrinkwrap Completed in 593ms npm http fetch GET 304 https://registry.npmjs.org/color 52ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/prebuild-install 95ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/semver 129ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/simple-get 133ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/detect-libc 141ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/tunnel-agent 143ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/node-addon-api 173ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/color-convert 48ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/color-string 49ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/color-name 71ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/simple-swizzle 41ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/is-arrayish 37ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/expand-template 76ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/github-from-package 78ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/rc 85ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/node-abi 87ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/napi-build-utils 93ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/minimist 94ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/lru-cache 38ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/yallist 32ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/ini 41ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/strip-json-comments 51ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/deep-extend 71ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/decompress-response 52ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/simple-concat 91ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/mimic-response 41ms (from cache) npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 1684ms npm timing stage:loadIdealTree Completed in 2501ms npm timing stage:generateActionsToTake Completed in 38ms npm verb correctMkdir C:\Users\Administrator\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\Administrator\AppData\Roaming\npm-cache_locks\staging-52a55f18c22b2769.lock for E:\renderi ng\nodeapp\node_modules.staging npm timing action:extract Completed in 64ms npm info lifecycle [email protected]~preuninstall: [email protected] npm info lifecycle [email protected]~uninstall: [email protected] npm verb unbuild rmStuff [email protected] from E:\rendering\nodeapp\node_modules npm info lifecycle [email protected]~postuninstall: [email protected] npm timing action:unbuild Completed in 4ms npm timing audit submit Completed in 1018ms npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 1019ms npm timing audit body Completed in 1ms npm timing action:remove Completed in 1135ms npm timing action:finalize Completed in 2ms npm timing action:refresh-package-json Completed in 10ms npm info lifecycle [email protected]~preinstall: [email protected] npm timing action:preinstall Completed in 1ms npm info linkStuff [email protected] npm timing action:build Completed in 1ms npm info lifecycle [email protected]~install: [email protected]

[email protected] install E:\rendering\nodeapp\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\Administrator\AppData\Roaming\npm-cache_libvips\libvips-8.12.2-win32-x64.tar.br sharp: Integrity check passed for win32-x64 sharp: Creating E:\rendering\nodeapp\node_modules\sharp\build\Release sharp: Copying DLLs from E:\rendering\nodeapp\node_modules\sharp\vendor\8.12.2\win32-x64\lib to E:\rendering\nodeapp\nod e_modules\sharp\build\Release prebuild-install info begin Prebuild-install version 7.1.1 prebuild-install info looking for local prebuild @ prebuilds\sharp-v0.30.7-napi-v5-win32-x64.tar.gz prebuild-install info looking for cached prebuild @ C:\Users\Administrator\AppData\Roaming\npm-cache_prebuilds\cc9cf8-s harp-v0.30.7-napi-v5-win32-x64.tar.gz prebuild-install info found cached prebuild prebuild-install info unpacking @ C:\Users\Administrator\AppData\Roaming\npm-cache_prebuilds\cc9cf8-sharp-v0.30.7-napi- v5-win32-x64.tar.gz prebuild-install info unpack resolved to E:\rendering\nodeapp\node_modules\sharp\build\Release\sharp-win32-x64.node prebuild-install info install Successfully installed prebuilt binary! npm verb lifecycle [email protected]~install: unsafe-perm in lifecycle true npm verb lifecycle [email protected]~install: PATH: C:\Users\Administrator\AppData\Roaming\nvm\v12.19.0\node_modules\npm\node modules\npm-lifecycle\node-gyp-bin;E:\rendering\nodeapp\node_modules\sharp\node_modules.bin;E:\rendering\nodeapp\node modules.bin;%SystemRoot%\system32\WindowsPowerShell\v1.0;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;c:\Pr ogram Files (x86)\Microsoft SQL Server\100\Tools\Binn;c:\Program Files\Microsoft SQL Server\100\Tools\Binn;c:\Program Files\Microsoft SQL Server\100\DTS\Binn;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE
;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\MySQL\MySQL Server 5.0\bin;C:\Program Files (x86)\Amazon\AWSCLI;C:\Program Files\Git\cmd;%NVM_HOME%;%NVM_SYMLINK% ;C:\Users\Administrator\AppData\Roaming\npm;C:\Users\Administrator\AppData\Roaming\nvm;C:\Program Files\nodejs npm verb lifecycle [email protected]~install: CWD: E:\rendering\nodeapp\node_modules\sharp npm timing action:install Completed in 2082ms npm info lifecycle [email protected]~postinstall: [email protected] npm timing action:postinstall Completed in 2ms npm verb unlock done using C:\Users\Administrator\AppData\Roaming\npm-cache_locks\staging-52a55f18c22b2769.lock for E:
rendering\nodeapp\node_modules.staging npm timing stage:executeActions Completed in 3325ms npm timing stage:rollbackFailedOptional Completed in 0ms npm timing stage:runTopLevelLifecycles Completed in 7039ms npm verb saving [ { name: 'sharp', spec: '^0.30.7', save: 'dependencies' } ] npm verb shrinkwrap skipping write for package.json because there were no changes. npm info lifecycle undefined~preshrinkwrap: undefined npm info lifecycle [email protected]~shrinkwrap: [email protected] npm verb shrinkwrap skipping write for package-lock.json because there were no changes. npm info lifecycle [email protected]~postshrinkwrap: [email protected] npm WARN [email protected] requires a peer of react@>=16.8 but none is installed. You must install peer dependencies yo urself. npm WARN [email protected] No description npm WARN [email protected] No repository field.

17 packages are looking for funding run npm fund for details

found 4 high severity vulnerabilities run npm audit fix to fix them, or npm audit for details npm verb exit [ 0, true ] npm timing npm Completed in 8123ms npm info ok

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

PS E:\rendering\nodeapp> npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp npx: installed 1 in 2.415s

System: OS: Windows Server 2008 6.1.7601 CPU: (1) x64 Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz Memory: 572.66 MB / 2.00 GB Binaries: Node: 12.19.0 - C:\Program Files\nodejs\node.EXE npm: 6.14.8 - C:\Program Files\nodejs\npm.CMD npmPackages: sharp: ^0.30.7 => 0.30.7

shweta-chalageri avatar Jul 06 '22 11:07 shweta-chalageri

This installation appears to have been successful.

What is the output of running npx envinfo --npmPackages=sharp --npmGlobalPackages=sharp in the E:\rendering\nodeapp directory? (I think this output was missing from the above.)

lovell avatar Jul 06 '22 15:07 lovell

hi , i have run the command npx envinfo --npmPackages=sharp --npmGlobalPackages=sharp result==>PS E:\rendering\nodeapp> npx envinfo --npmPackages=sharp --npmGlobalPackages=sharp npx: installed 1 in 37.349s

npmPackages: sharp: ^0.30.7 => 0.30.7

after running my app ,again getting same error

PS E:\rendering\nodeapp> node .\app.js

E:\rendering\nodeapp\node_modules\sharp\lib\sharp.js:34

throw new Error(help.join('\n')); ^

Error: Something went wrong installing the "sharp" module

The specified module could not be found. \?\E:\rendering\nodeapp\node_modules\sharp\build\Release\sharp-win32-x64.node

Possible solutions:

  • Install with verbose logging and look for errors: "npm install --ignore-scripts=false --foreground-scripts --verbose s harp"
  • Install for the current win32-x64 runtime: "npm install --platform=win32 --arch=x64 sharp"
  • Consult the installation documentation: https://sharp.pixelplumbing.com/install at Object. (E:\rendering\nodeapp\node_modules\sharp\lib\sharp.js:34:9) at Module._compile (internal/modules/cjs/loader.js:1015:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10) at Module.load (internal/modules/cjs/loader.js:879:32) at Function.Module._load (internal/modules/cjs/loader.js:724:14) at Module.require (internal/modules/cjs/loader.js:903:19) at require (internal/modules/cjs/helpers.js:74:18) at Object. (E:\rendering\nodeapp\node_modules\sharp\lib\constructor.js:8:1) at Module._compile (internal/modules/cjs/loader.js:1015:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)

shweta-chalageri avatar Jul 07 '22 04:07 shweta-chalageri

Are there any other native dependencies, e.g. canvas? What is the output of running npm ls node-addon-api nan in the E:\rendering\nodeapp directory?

lovell avatar Jul 07 '22 10:07 lovell

PS E:\rendering\nodeapp> npm ls node-addon-api nan [email protected] E:\rendering\nodeapp -- [email protected] -- [email protected]

this is Package.js file { "name": "reactcanvas", "version": "1.0.0", "description": "", "main": "app.js", "scripts": { "test": "echo "Error: no test specified" && exit 1" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { "@aws-sdk/client-s3": "^3.94.0", "@aws-sdk/s3-request-presigner": "^3.94.0", "aws-cloudwatch-log": "^0.1.2", "aws-cloudwatch-log-browser": "^0.1.3", "aws-sdk": "^2.1136.0", "cors": "^2.8.5", "dotenv": "^16.0.1", "dpi-tools": "^1.0.7", "express": "^4.18.1", "express-fileupload": "^1.3.1", "md5": "^2.3.0", "node-fetch": "^2.6.1", "puppeteer": "^14.4.1", "react-router": "^6.3.0", "send-cloudwatch-log": "^1.0.1", "sharp": "^0.30.7" } }

shweta-chalageri avatar Jul 07 '22 11:07 shweta-chalageri

Thanks, please can you provide the list of files in the E:\rendering\nodeapp\node_modules\sharp\build\Release directory.

lovell avatar Jul 07 '22 14:07 lovell

List of files in the Release directory are as follows

libglib-2.0-0.dll libgobject-2.0-0.dll libvips-42.dll libvips-cpp.dll sharp-win32-x64.node

This sharp error i am getting on windows server 2008 only .. Just to check i tried on windows server 2019 and it ran successfully without any error

shweta-chalageri avatar Jul 08 '22 05:07 shweta-chalageri

Hello Lovell/Sharp I have set the list of file in that folder ,plz check it if any suggestions.I am not able run the application bcoz of this error sharp error.

On Thu, Jul 7, 2022, 7:40 PM Lovell Fuller @.***> wrote:

Thanks, please can you provide the list of files in the E:\rendering\nodeapp\node_modules\sharp\build\Release directory.

— Reply to this email directly, view it on GitHub https://github.com/lovell/sharp/issues/3284#issuecomment-1177677794, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZQDAARUVOD7BZ2EQVZOQLDVS3QOZANCNFSM52ZLIXUQ . You are receiving this because you authored the thread.Message ID: @.***>

shweta-chalageri avatar Jul 09 '22 16:07 shweta-chalageri

Perhaps try https://github.com/lucasg/Dependencies on the machine that fails.

lovell avatar Jul 27 '22 09:07 lovell

Closing as there are no recent updats and I suspect there's something wrong with this specific Windows Server 2008 installation, perhaps some missing runtime DLLs that are part of Windows itself.

lovell avatar Aug 24 '22 16:08 lovell