NPM active-win package with NODE_MODULE_VERSION 106 - node.js

I'm working on a little Electron.js app. I want to get information about active window so I came across npm package active-win. I get it working at Linux and OSx without problem, but on Windows I get version error.
UnhandledPromiseRejectionWarning: Error: The module '\\?\C:\...\git\in_sane_factory\desktop-app\node_modules\iconv\build\Release\iconv.node'was compiled against a different Node.js version using
NODE_MODULE_VERSION 108. This version of Node.js requires
NODE_MODULE_VERSION 106. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
The iconv package is needed for active-win in version above 2. Highest version and default to install is 2.3.5. Only other version that I manage to install was 2.3.4 and that did not solve anything.
I tried to npm install, npm rebuild, cloning iconv repository and installing this version manualy via npm install <path>.
I tried to install the right version of Node.js but by official version table, there is no version 106. I only manage to upgrade from 93 to 108.
I'm not really skilled Node.js user and now I'm trully hopeless. Do you have any advice or idea, what may solve this?
Sources:
My APP: https://gitlab.com/insanefactory/desktop-app
iconv NPM: https://www.npmjs.com/package/iconv
active-win NPM: https://www.npmjs.com/package/active-win
ref-wchar-napiNPM: https://www.npmjs.com/package/ref-wchar-napi
NPM releas version table: https://nodejs.org/en/download/releases/

Node.js version or version of package was not the issue in the end. After a few weeks I found out, where I was wrong. All needed to fix it was installing electron-rebuild and then running simple .\node_modules\.bin\electron-rebuild.cmd.
Hope, if you come across similar problem, this can help you as well.

I think you are basically running a different nodejs version on your windows machine. Cross check with the version on your Mac to confirm.

Related

How to update the NodeJS version in linux? (Issue occurs when trying to install jsreport-pdf-password)

2019-04-04T04:34:49.035Z - error: Error when loading extension Error: The module '/media/vishesh/Disc/working/examples/jsreport_pdf_password_install_tryout/node_modules/jsreport-pdf-password/node_modules/hummus/binding/hummus.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 51. This version of Node.js requires
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
Error: The module '/media/vishesh/Disc/working/examples/jsreport_pdf_password_install_tryout/node_modules/jsreport-pdf-password/node_modules/hummus/binding/hummus.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 51. This version of Node.js requires
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
I have tried downgrading node version using nvm. I have successfully done it and reduce to the required version (i.e)8.9.1. Thus when i check the command "node -v" i get 8.9.1.
But when i check "nodejs -v" i only get 11.9.0. Thus the above mentioned error occurred. I am unable to identify how to change the nodejs version also ? Any ideas ?
Also, i have tried installing "jsreport-pdf-password" with same version 11.9.0 in node and nodejs in a completely different folder and also by deleting the node_modules. Still getting this error.
After downloading node version using the command nvm install 8.9.1, it will download that version but won't use it. To use version 8.9.1 you have to run another command nvm use 8.9.1. Then your node version manager will start to use 8.9.1.
I got it. I searched in stackoverflow for a while and got in a post that node is the alias used by npm for nodejs. The nodejs is alias of nodejs version that the ubuntu os installs. Thus i removed the nodejs using this command "sudo apt-get remove nodejs".
Then i used nvm and set 7.10.0 as default node version. Later installed the package jsreport-pdf-password and ran the code. Now there was no error in run time regarding any version missmatch.
As far as the package is conserned it requires node version 7 and anything above or below, the error in question occurs. I tried to even rebuild the package at a later version but it did not solve the issue. Thus i recommend not to use this package if your node version is greater than 7.

Angular5 node js and npm installation problems

I have the latest versions of Node and NPM installed, using which I installed Angular/cli, but it's shooting me with following errors: angular/cli and npm versions not compatible with current version of node.
I suspect that I may(not) be installing out of the proper directory. But at this point, what else can I do? thanks.
Please check: Screenshot with details of the issue
I also faced a similar problem, but the solution was quite simple : my path was too long.
I shortened it a bit (two directories down) and then I did the install again with success.
Here are the reqs.
Both the CLI and generated project have dependencies that require Node 6.9.0 or higher, together with NPM 3 or higher.
You are using the latest node.js 9.2
you need to uninstall or rollback to 8.9 !!
Here is a guide
https://github.com/angular/angular-cli
Hope this solves it for you.
I faced a similar problem with angular/cli version not compatible with the current node version. This generally happens when you are upgrading from lower version of Angular to any other higher version.
You can try following steps:
npm outdated --> To list latest and current package details in local application.
npm update --> to update the local packages.
If it still doesn`t work,
Try deleting the 'node_modules' folder and install dependencies of fresh:
npm install
You can then check whether all packages, including the cli is not outdated.

How to install node-sass and gulp-sass?

I have trouble with installing dependencies in my project. Gulp-sass version is 2.0.4. When I try to install with npm install I'm getting error 404 with node-sass v3.13.1. There is no link for it. I've also tried to insert source file of node-sass v3.13.1 but it's not working. I know the trouble is with link, but is there any way to get around this?
Node-sass is a c++ bridge so particular versions are only supported for some versions of NodeJS. In this case, you are running a new version of Node, that older version node-sass doesn't support. Newer versions also provide better error messages for this.

Why does Node.js's Mac Package ship with old version of npm? any issues?

I just installed the current version of node (3/14/16) 4.4.0 directly from Node.js via a Mac Package (the new suggested way, previously I installed via Homebrew).
I'm curious if anyone knows why the package ships with npm version 2.14.20, the book I'm going through suggests updating npm manually with the command
sudo npm install npm -g
The version I see is now 3.8.1, that's quite a large difference hence my question, is it safe/smart to be this far ahead of what Node.js is officially putting out with their Mac package file?
EDIT:
It appears it's common for Node's recommended v4.x install to come with npm 2.x, the question that remains is, will there be any negative side effects of using the newest npm but an older version of node?

Satellizer installation error in windows

I am trying to install Satellizer.
But getting error.
Can you guide me to understand whats this error is, and how can I fix this.
I have node version v5.1.0 and npm version 3.5.2
Looks like you have the Satellizer as a decency inside your package.json
Or
That the project name is the same of one your depended package(s)
If it not a depended package, there used to be some error with npm v3.5.X so try to update your npm version and then re-install it.
I would also recommend to test it with node v4.X since v5 might contain those kind of bugs

Resources