My very first Raspberry and I want to install the Smart-mirror. When running npm start, it launch the home screen, but also coming with this error:
Error: The module '/home/pi/smart- mirror/node_modules/grpc/node/extension_binary/grpc_node.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 48. This version of Node.js requires NODE_MODULE_VERSION 51. Please try re-compiling or re-installing the module (for instance, using 'npm rebuild' or 'npm install')
I tried both, but ending up with the same error.
How do I fix it?
Related
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.
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.
I am trying to include the sqlite3 package into my electron project. I I get this error:
have done postinstall. It runs correctly on nodejs.
node_modules/sqlite3/lib/binding/electron-v4.0-darwin-x64/node_sqlite3.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 69. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install).
I have the same issue with using sqlite on my developing app, The problem comes from Electron that's change the NODE_MODULE_VERSION to 69 refer to githup issue page to find more info https://github.com/electron/electron/pull/16687
I don't find a really working way to solve the problem for now just downgrade the electron and sqlite version to an older version should solve the problem and build the native module.
I'm upgrading my Node js application from version 8 to version 10
suddenly when i tried to run the application it throws an error with the description bellow
cannot load the oracledb add-on binary for Node.js 10.9.0 (win32, x64)
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 64. Please try re-compiling or re-installing the
module (for instance, using npm rebuild or npm install).
Node-oracledb installation instructions:
https://oracle.github.io/node-oracledb/INSTALL.html
if i downgrade my nodejs to version 8, it works like a charm, my application uses some version 10 features that recently added
i have tried to remove all modules and then i typed npm install in order to reinstall modules properly i got failed with message above.
i also tried to follow node js installation with no luck, what should i do ?
I currently an trying to make a node js project using electron and node-gyp for c addons. But when I try to run my program using
electron index.js
I get this error:
A JavaScript error occurred in the main process
Uncaught Exception:
Error: The module '/home/ubspy/Code/Node-c-test/build/Release/addons.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 54. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or`npm install`).
at process.module.(anonymous function) [as dlopen]
I've tried reinstalling all the packages, and recompiling all the source code, I don't know what's wrong.
I figured it out after many a trial and error, after upgrading electron to the most recent beta version the module versions matched, and the program ran flawlessly.