How can I fix the error while installing opencv4nodejs? - node.js

I use visual studio code and I tried to use opencv in my project.
npm install opencv4nodejs
Error:
ERR! Error: failed to execute cmake --version, cmake is required to build opencv, error is: Error: Command failed: cmake --version
'cmake'��(��) ���� �Ǵ� �ܺ� ����, ������ �� �ִ� ���α׷�, �Ǵ�
��ġ ������ �ƴմϴ�.
npm ERR! opencv-build#0.1.9 install: `node ./install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the opencv-build#0.1.9 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:
I thought it was an error for cmake, but I already installed cmake(version:3.20.3)
How can I fix this problem? I use Windows.

Related

I am installin sharp in mac m1, for Gatsby js but it is showing error /usr/local/include/vips/vips8:35:10: fatal error: 'glib-object.h' file not found

I run this command npm
install --arch=arm64 --platform=linuxmusl sharp
It showed this error
npm ERR! warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols)
npm ERR! In file included from ../src/common.cc:24:
npm ERR! /usr/local/include/vips/vips8:35:10: fatal error: 'glib-object.h' file not found
npm ERR! #include <glib-object.h>
npm ERR! ^~~~~~~~~~~~~~~
npm ERR! 1 error generated.
npm ERR! make: *** [Release/obj.target/sharp-darwin-x64/src/common.o] Error 1
Running $ brew install vips allowed me to install Gatsby. I'm not sure if it would fix the issue with installing sharp directly, but it looks like it would be worth a try, based on your error message.
https://github.com/gatsbyjs/gatsby/discussions/30528#discussioncomment-544675

why does node-sodium package is not working

Here I'm using node for making a discord bot, but there is a problem in the packages I think
Also, sodium is not found in the node_modules directory (folder)
tried many ways but nothing work :(
Repl.it: Updating package configuration
--> npm install
> sodium#3.0.2 preinstall /home/runner/test/node_modules/sodium
> node install.js --preinstall
Static libsodium was not found at /home/runner/test/node_modules/sodium/deps/build/lib/libsodium so compiling libsodium from source.
libtool is required, but wasn't found on this system
Makefile:61: recipe for target 'libsodium' failed
make: *** [libsodium] Error 1
/home/runner/bgrb/node_modules/sodium/install.js:293
throw new Error(cmdLine + ' exited with code ' + code);
^
Error: make libsodium exited with code 2
at ChildProcess.<anonymous> (/home/runner/test/node_modules/sodium/install.js:293:19)
at ChildProcess.emit (events.js:314:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
npm WARN discord.js#11.6.4 requires a peer of #discordjs/uws#^10.149.0 but none is installed. You must install peer dependencies yourself.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sodium#3.0.2 preinstall: `node install.js --preinstall`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sodium#3.0.2 preinstall 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! /home/runner/.npm/_logs/2021-03-07T10_42_18_435Z-debug.log
exit status 1
I'm going to assume you're using some form of linux distro. (correct me if im wrong.)
by the looks of it you're missing libtool
try running apt-get install libtool in your terminal. (or install with whatever package manager you're using!)
if you're not using linux, or you are still having trouble please feel free to respond to this post.

opencv4nodejs installation issue

I am Facing trouble in installing opencv4nodejs in windows, i am getting following error.
opencv-build#0.0.15 install C:\Users\Mypc\AppData\Roaming\npm\node_modules\opencv4nodejs\node_modules\opencv-build
node ./install.js
info install if you want to use an own OpenCV installation set OPENCV4NODEJS_DISABLE_AUTOBUILD
info install library dir does not exist: C:\Users\Mypc\AppData\Roaming\npm\node_modules\opencv4nodejs\node_modules\opencv-build\opencv\build\lib\Release
info install running install script...
ERR! Error: Command failed: git --version
'git' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! opencv-build#0.0.15 install: node ./install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the opencv-build#0.0.15 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:
Git was not installed in windows, that was the issue. it's working perfectly now.
Git needs to be installed, it will solve this problem

npm i Running command - failed! (exit code 254)

Ionic :3.20.0
node: v8.10.0
npm: 5.6.0
npm i
✖ Running command - failed!
[ERROR] An error occurred while running npm i (exit code 254):
npm ERR! path
/Users/lucaszimmermann/Desktop/myApp/node_modules/tsickle/src/main.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod
'/Users/lucaszimmermann/Desktop/myApp/node_modules/tsickle/src/main.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR!
/Users/lucaszimmermann/.npm/_logs/2018-04-04T16_41_39_270Z-debug.log
I faced a similar issue after doing the below actions this issue solved.
Delete package-lock.json file.
Open cmd/terminal in administrator mode.
run command: npm install
run command: npm update
Node version is likely incompatible. There'd be an expected version actual version. Use nvm or similar to install and change node versions.
Delete node_modules and try install again. You probably get a message similar to:
error ts-jest#26.1.2: The engine "node" is incompatible with this module. Expected version ">= 10.21.0". Got "10.20.1"
error Found incompatible module.
You wan't try to install npm packages.
You have two options to install some packages:
First Option:
npm install <package>
npm i <package>
Second Option:
If you wan't to create an automated installation process without each package, you must provide an packge.json - Here are all depencies listed. You can only run npm i or npm install without an package name, if you have an package.json
A full documentation about that is on NPM: https://docs.npmjs.com/files/package.json

npm install: 'bower install' exited with error code 1

I want to programm widgets for XBee ZigBee Cloud Kit.
To do it, I need first to set up everything.
I'm using this guide.
After failing repeatedly the automated setup I started the Manual setup. I did install the Requirements. So everything so far went good until the last point: npm install. I'm getting the following error bower install' exited with error code 1. I'm not sure what to do, I'm not used to PowerShell or any other shell.
After failing the installing I get this errors:
bower justgauge#* ECMDERR Failed to
execute "git ls-remote --tags --heads git://github.c
om/oscarcv/justgage.git", exit code of #128 fatal: remote error:
Repository not found.
Additional error details: fatal: remote error: Repository
not found.
'bower install' exited with error code 1
npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "i nstall"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! code ELIFECYCLE
npm ERR! xbee-zigbee-cloud-kit#1.0.0 postinstall: node postinstall.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the xbee-zigbee-cloud-kit#1.0.0 postinstall script 'node postinstall.js'.
npm ERR! This is most likely a problem with the xbee-zigbee-cloud-kit package,
npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system:
npm ERR! node postinstall.js npm ERR!
You can get their info via:
npm ERR! npm owner ls xbee-zigbee-cloud-kit
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\steim\Desktop\XBeeZigBeeCloudKit-master\npm-debug.log
"This is most likely a problem with the xbee-zigbee-cloud-kit package"
If this is true, in that case I don't know what to do, because I work with this package.
This is the npm-debug.log. (Sorry I can't post the whole log, too many characters).
I'm using a company laptop:
Latitude D820
Windows 7 32 Bit
Windows PowerShell with Administration
I'm grateful for any kind of help. I'm getting headache trying to figure it out.
I could solve it. And can now run the app now localy.
I did this steps to solve the issue:
Deleting justgage in bower.json file.
Using commandline: bower install justgage-official
Using commandline: bower update
The only problem is actually I can't start with foreman start (but it's another issue), instead I use python manage.py runserver 0.0.0.0:5000. After that in browser: http://localhost:5000
Thanks Etan Reisner for the hint and thanks Oscar Costoya for guiding me.

Resources