zodern / meteor-up

Production Quality Meteor Deployment to Anywhere
http://meteor-up.com/
MIT License
1.27k stars 280 forks source link

[SOLUTION] The N-API version of this Node instance is 1. This module supports N-API version(s) 3. This Node instance cannot run this module. #1147

Open leogaletti opened 4 years ago

leogaletti commented 4 years ago

Today I had a problem with mup deploy. When running the command the following error appeared in the prepare bundle: The N-API version of this Node instance is 1. This module supports N-API version (s) 3. This Node instance cannot run this module.

After investigating and looking for possible solutions, i found the solution to the problem. The version of the node in the mup.js file was old (abernix/meteord:node-8.4.0-base) and therefore did not work. I decided to change it to version 12 of nodejs (abernix/meteord:node-12-base) and voilá, it worked perfectly.

Here is a tip for those who go through this problem. I'm posting on issues because it's easier to find, I didn't find anything about it myself to be easy to solve.

Thanks to everyone for this wonderful simple deployment that is mup!

TomTem commented 4 years ago

I had the exact same problem because copy paste from old project. Changing version in mup.js fixed it, thx

Oyshoboy commented 3 years ago

Had a same issue, and found the solution. In my case, I forgot to update docker image version, to actual one. For my project, with version meteor@1.9.3 worked this docker image: abernix/meteord:node-12-base

You can find meteor version in .meteor/versions file.

You can find supported & recommended images for your meteor project here: http://meteor-up.com/docs.html#meteor-support

santoshs715s commented 3 years ago

Hi getting below error electron - v12.0.5 npm - 6.13.7 sqlite - ^5.0.2 Angular CLI: 11.2.11 Node: 10.20.1 typescript 4.1.5

Uncaught Error: The N-API version of this Node instance is undefined. This module supports N-API version(s) 3. This Node instance cannot run this module. at Object.module.exports.validate_package_json (G:\Universal_Business_management\business-management\node_modules\node-pre-gyp\lib\util\napi.js:84:9) at Object.validate_config (G:\Universal_Business_management\business-management\node_modules\node-pre-gyp\lib\util\versioning.js:229:10) at Object.exports.find (G:\Universal_Business_management\business-management\node_modules\node-pre-gyp\lib\pre-binding.js:21:15) at Object. (G:\Universal_Business_management\business-management\node_modules\sqlite3\lib\sqlite3-binding.js:3:27) at Module._compile (module.js:556:32) at Object.Module._extensions..js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.require (module.js:483:17)