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 7567523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:41:08+00:00 2026-05-30T14:41:08+00:00

According to the comment in node.js file src/node.js , line 55 , and this

  • 0

According to the comment in node.js file src/node.js, line 55, and this discussion thread about the topic (Standalone? – nodejs):

// To allow people to extend Node in different ways, this hook allows
// one to drop a file lib/_third_party_main.js into the build
// directory which will be executed instead of Node's normal loading.

So I figured I could do something like this:

git clone https://github.com/joyent/node \
  && cd ./node \
  && echo 'console.log("Hello, World!");' > lib/_third_party_main.js \
  && ./configure
  && make -j4

But the resulting executable at “./node” just runs the normal REPL loop (or main module if an argument is given) as though the “third party main” module wasn’t detected. I was hoping the executable would instead print “Hello, World!” (per my custom main module) and exit so I could build a statically linked executable for simple distribution of a node-based application.

Any idea how to get this “standalone” build via “_third_party_main” working?

  • 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-05-30T14:41:09+00:00Added an answer on May 30, 2026 at 2:41 pm

    Didn’t automatically compile in for me either. It’s up to the build system to compile that JS file into the main executable, so it looks like it’s not doing that automatically.

    It works if I add 'lib/_third_party_main.js' to the node.gyp file’s 'library_files' key, so maybe just stick with that?

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

Sidebar

Related Questions

According to this discussion , the iphone agreement says that it doesn't allow loading
According to this reddit comment thread , it is undefined if an attempt is
According to the answers to this question, I cannot embed a file version in
According to the comment on this answer it is possible to catch Fatal Errors
According to the comment in PHP manual about Copy(): http://php.net/manual/en/function.copy.php The copy() will change
According to this benchmark http://jsperf.com/function-vs-function created functions run about 1000 times faster. Can you
I've added org.eclipse.core.net and org.eclipse.ui.net to my RCP application. According to this comment ,
**EDIT: There are several options below that would work. Please vote/comment according to your
According to this article , it's possible to get multiline XML comments -- instead
I'm attempting to attach a file to a comment in a message with 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.