Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install numjs

Tags:

node.js

I want to npm install numjs but after 6 hours searching for a solution I have the same problem, an error at the step where it needs to install sharp.

I tried to uninstall everything and reinstall but it still don't want to it. I tried a thousand of solutions that I already forgot but I don't success to do it. What can I try next?

The console output :

gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 
1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\Franck\AppData\Roaming\nvm\v12.17.0\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Franck\\AppData\\Roaming\\nvm\\v12.17.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Franck\Documents\CRMexperiment\node_modules\sharp
gyp ERR! node -v v12.17.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\watchpack-chokidar2\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\webpack-dev-server\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Franck\AppData\Roaming\npm-cache\_logs\2020-06-01T13_57_14_910Z-debug.log

The errors in log file:

1066 error errno 1
1067 error [email protected] install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
1067 error Exit status 1
1068 error Failed at the [email protected] install script.
1068 error This is probably not a problem with npm. There is likely additional logging output above.
like image 684
FranckEl Avatar asked Mar 11 '26 09:03

FranckEl


1 Answers

You need to update sharp to at least 0.22.1 in order for it to work. This has already been updated inside numjs on Apr 30, 2020 -- see this commit but this is not the version available in npm (npm still serves sharp 0.20.3 i.e. Jun 13 2018 version of the package.json, as the CI fails with newer sharp.

Since it's there in the master (main) branch, you can simply pull it from github like:

npm install https://github.com/nicolaspanel/numjs
yarn add https://github.com/nicolaspanel/numjs
like image 182
Saravanabalagi Ramachandran Avatar answered Mar 12 '26 21:03

Saravanabalagi Ramachandran



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!