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

Something went wrong installing the "sharp" module #25

Open
huangzsdy opened this issue Sep 5, 2024 · 3 comments
Open

Something went wrong installing the "sharp" module #25

huangzsdy opened this issue Sep 5, 2024 · 3 comments

Comments

@huangzsdy
Copy link

After following the steps:
"git clone https://github.com/poloclub/transformer-explainer.git
cd transformer-explainer
npm install
npm run dev"

report an error:
Error:
Something went wrong installing the "sharp" module

Cannot find module '../build/Release/sharp-win32-x64.node'

image.

@milong26
Copy link

maybe similar problem:

npm warn deprecated @types/[email protected]: This is a stub types definition. gsap provides its own type definitions, so you do not need this installed.
npm warn cleanup Failed to remove some directories [
npm warn cleanup [
npm warn cleanup '\explainer\transformer-explainer\node_modules\@xenova\transformers\node_modules',
npm warn cleanup [Error: EPERM: operation not permitted, rmdir '\explainer\transformer-explainer\node_modules@xenova\transformers\node_modules'] {
npm warn cleanup errno: -4048,
npm warn cleanup code: 'EPERM',
npm warn cleanup syscall: 'rmdir',
npm warn cleanup code: 'EPERM',
npm warn cleanup syscall: 'rmdir',
npm warn cleanup path: \explainer\transformer-explainer\node_modules\@xenova\transformers\node_modules'
npm warn cleanup syscall: 'rmdir',
npm warn cleanup path: '\explainer\transformer-explainer\node_modules\@xenova\transformers\node_modules'
npm warn cleanup path: '\explainer\transformer-explainer\node_modules\@xenova\transformers\node_modules'
npm warn cleanup }
npm warn cleanup ]
npm warn cleanup }
npm warn cleanup ]
npm warn cleanup ]
npm error code 1
npm error path \explainer\transformer-explainer\node_modules\sharp
npm error command failed
npm warn cleanup ]
npm warn cleanup ]
npm error code 1
npm error path \explainer\transformer-explainer\node_modules\sharp
npm error command failed
npm error command C:\Windows\system32\cmd.exe /d /s /c (node install/libvips && node install/dll-copy && prebuild-install) || (node instanpm error command failed
npm error command C:\Windows\system32\cmd.exe /d /s /c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
npm error command C:\Windows\system32\cmd.exe /d /s /c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
ll/can-compile && node-gyp rebuild && node install/dll-copy)
npm error sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.14.5/libvips-8.14.5-win32-x64.tar.br
npm error sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
npm error sharp: Installation error: Request timed out
npm error sharp: Installation error: Request timed out
npm error A complete log of this run can be found in: \nodejs\node-v20.17.0-win-x64\node-cache_logs\2024-09-12T08_32_06_596Z-debug-0.log

I deleted my own path prefix,btw npm v 10.8.2 and nodejs v 20.17.0

@huangzsdy
Copy link
Author

maybe similar problem:

npm warn deprecated @types/[email protected]: This is a stub types definition. gsap provides its own type definitions, so you do not need this installed. npm warn cleanup Failed to remove some directories [ npm warn cleanup [ npm warn cleanup '\explainer\transformer-explainer\node_modules@xenova\transformers\node_modules', npm warn cleanup [Error: EPERM: operation not permitted, rmdir '\explainer\transformer-explainer\node_modules@xenova\transformers\node_modules'] { npm warn cleanup errno: -4048, npm warn cleanup code: 'EPERM', npm warn cleanup syscall: 'rmdir', npm warn cleanup code: 'EPERM', npm warn cleanup syscall: 'rmdir', npm warn cleanup path: \explainer\transformer-explainer\node_modules@xenova\transformers\node_modules' npm warn cleanup syscall: 'rmdir', npm warn cleanup path: '\explainer\transformer-explainer\node_modules@xenova\transformers\node_modules' npm warn cleanup path: '\explainer\transformer-explainer\node_modules@xenova\transformers\node_modules' npm warn cleanup } npm warn cleanup ] npm warn cleanup } npm warn cleanup ] npm warn cleanup ] npm error code 1 npm error path \explainer\transformer-explainer\node_modules\sharp npm error command failed npm warn cleanup ] npm warn cleanup ] npm error code 1 npm error path \explainer\transformer-explainer\node_modules\sharp npm error command failed npm error command C:\Windows\system32\cmd.exe /d /s /c (node install/libvips && node install/dll-copy && prebuild-install) || (node instanpm error command failed npm error command C:\Windows\system32\cmd.exe /d /s /c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy) npm error command C:\Windows\system32\cmd.exe /d /s /c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy) ll/can-compile && node-gyp rebuild && node install/dll-copy) npm error sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.14.5/libvips-8.14.5-win32-x64.tar.br npm error sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies npm error sharp: Installation error: Request timed out npm error sharp: Installation error: Request timed out npm error A complete log of this run can be found in: \nodejs\node-v20.17.0-win-x64\node-cache_logs\2024-09-12T08_32_06_596Z-debug-0.log

I deleted my own path prefix,btw npm v 10.8.2 and nodejs v 20.17.0

refer to lovell/sharp#3922 . I just removed any outdated versions of sharp in files/directories such as "C:\Users\ANUNEZ\AppData\Local\sf\package.json" and "C:\Users\ANUNEZ\AppData\Local\sf\node_modules." Then it works

@Harryyu24
Copy link

yuhuadeMacBook-Pro:~ yuhua$ cd transformer-explainer
yuhuadeMacBook-Pro:transformer-explainer yuhua$ npm install
npm warn deprecated @types/[email protected]: This is a stub types definition. gsap provides its own type definitions, so you do not need this installed.
npm error code EEXIST
npm error syscall rename
npm error path /Users/yuhua/.npm/_cacache/tmp/6a0d3046
npm error dest /Users/yuhua/.npm/_cacache/content-v2/sha512/29/56/d3c6505895c921179c207f26574d69cc9fb30c66332ef571bc6cf96589438ff5385a17842784ff2aae3ac7ec34731df4a4d2842fd704e85be880e466a311
npm error errno -13
npm error EACCES: permission denied, rename '/Users/yuhua/.npm/_cacache/tmp/6a0d3046' -> '/Users/yuhua/.npm/_cacache/content-v2/sha512/29/56/d3c6505895c921179c207f26574d69cc9fb30c66332ef571bc6cf96589438ff5385a17842784ff2aae3ac7ec34731df4a4d2842fd704e85be880e466a311'
npm error File exists: /Users/yuhua/.npm/_cacache/content-v2/sha512/29/56/d3c6505895c921179c207f26574d69cc9fb30c66332ef571bc6cf96589438ff5385a17842784ff2aae3ac7ec34731df4a4d2842fd704e85be880e466a311
npm error Remove the existing file and try again, or run npm
npm error with --force to overwrite files recklessly.
npm error A complete log of this run can be found in: /Users/yuhua/.npm/_logs/2024-09-24T05_47_39_540Z-debug-0.log

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

No branches or pull requests

3 participants