I'm trying to upgrade a live node application that resides in AWS Elastcibeanstalk from v8.12.0 to v10.13.0
and the only issue that I see is caused by sharp complaining about being built with a different version.
Here's the error:
Error: The module '/var/app/current/node_modules/sharp/build/Release/sharp.node'
was compiled against a different Node.js version using
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).
I can't upgrade our prod aws elb instances because of this issue.
Not sure what to do at this point..
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.
I am limited in my cloud environment to Node v10.15.x and I need 10+ for experimental-modules. However, when I try to install OracleDB I get...
oracledb ERR! NJS-069: node-oracledb 4.1.0 requires Node.js 10.16 or later
oracledb ERR! An older node-oracledb version may work with Node.js v10.15.0
If I try downgrading OracleDB to 3.1.2 it requires Node 8 so this won't work either.
oracledb ERR! NJS-067: a pre-built node-oracledb binary was not found for Node.js v12.1.0 (NODE_MODULE_VERSION=72) on win32 x64
oracledb ERR! Try compiling node-oracledb source code using https://oracle.github.io/node-oracledb/INSTALL.html#github
Is there a way to get oracledb to work with Node 10.15?
Update
This seems to not be clear so let me be explicit. Locally I have Node 12 this works fine with v 4.1.0 of OracleDB. However, this doen't work when I try to upload to Cloud Foundry because the version is 10.15. When I downgrade to 3.1.2 OracleDB it no longer compiles locally and won't deploy to Gaia because it needs a version of node that is less than 9 and we need greater than 9 for other features.
There were prebuilt node-oracledb 3.1.2 binaries for Node 6, 8, 10, and 11.
Your text above says you want to use Node.js 10.15 but your example shows you tried to install on Node.js 12: Node.js v12.1.0 (NODE_MODULE_VERSION=72), hence your error. Make sure Node.js is the desired version 10, and try again with node-oracledb 3.1.2.
If you want to use node-oracledb 4 with Node.js 10.15, then compile from source code. The message is clear.
But you really should upgrade Node.js to a later version and get all the Node.js security fixes.
Update to address comment: if npm can't access the npmjs.com repo, you may be able to manually download https://registry.npmjs.com/oracledb/-/oracledb-3.1.2.tgz and install from a local file e.g. npm install /file/path/to/oracledb-3.1.2.tgz or in package.json use a dependency "oracledb": "file:/file/path/to/oracledb-3.1.2.tgz", similar to https://oracle.github.io/node-oracledb/INSTALL.html#selfhost.
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 ?