Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8829187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:46:43+00:00 2026-06-14T07:46:43+00:00

I used the steps explained in this page: http://nodejs.org/api/addons.html and successfully created a addon.node

  • 0

I used the steps explained in this page: http://nodejs.org/api/addons.html and successfully created a addon.node file using the node-gyp tool. it works fine and it’s a wrapper of a c++ static library.

Now I want to distribute this, I created the package.json file using:

npm init

and test it using “npm install . -g” but it tries to recompile the module which will be difficult to achieve because it will require the libraries that I’m embedding into the .node file, is it possible to distribute the .node file that I already compiled in my system?

How can I include the compiled .node file into the npm package and upload it to the npm registry. I’m sure I’m just one step to made it, but I dont know where to start.

I read about the dependencies, but seems that it’s suited when your module depends on other modules, and not with your own .node file.

Thanks for your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T07:46:44+00:00Added an answer on June 14, 2026 at 7:46 am

    ok, I finally did what I wanted to achieve, here’re the options in case someone else needs this:

    1. To avoid the compilation you could create a new folder and copy the package.json in there, along with the .node file, I didn’t find this, just tried and it worked.
    2. Provide the required libraries to allow the user his own compilation.

    Although the first one worked well, I will need to create a package for windows, linux, mac, etc. Which looks very odd to say: “if you are in linux use: npm install xxx-linux”, so I decided to adjust my library to allow the user the module compilation.

    To do this I created a “client-dev” installer that has the required libraries precompiled, as long as the include headers required, then created the node module to be compiled using the preinstalled libraries and headers. I will need to add a help in my website to explain that, in order to install the module, the user will need to install the dependencies first using apt-get, windows installer, or mac pkg.

    Although this works for me, I don’t know if that will be maintainable in the long run, but I didn’t find a better way to do this. (the only link that finally enlightened my goal was one saying: “if you’re going to use node modules with precompiled libraries you will have nightmares”, anyway… I prefer that instead of doing a full implementation in node js from scratch and maintain version for java, c#, nodejs, php, etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My application has a wizard with some steps used to export data. I want
I have used the folllowing steps to add classes to my build path still
I used the step-by-step building application from the http://msdn.microsoft.com/en-us/library/hh202876(v=vs.92).aspx but the .sdf file won't
Could you please help me understand this Tabu search page 7 example: TS is
The document.ready is used to execute code after the DOM is fully loaded. This
This is a function used to detect VML support in browsers. It's part of
I used to do this: SELECT layerID FROM layers WHERE ownerID = ? AND
got some problems. Built an applet that has to be used step-by-step. After each
I used In App Purchase and i follow all step to create In App
In C++, I used to write a function that stops the execution of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.