2


I have a console like application in node js , and i want to package it for window's executable .
My project is setup is regular :

app.js node_moudles bin readme.md support file support file package.json 

Both support files are generated when the program is run first time .
Another detail , some of my dependencies are native applications(I'm using electron).
Is there a packaging solution , as i want to distribute only a exe that will have a node js instance as well as all my modules ?

2
  • 2
    A simple solution that may not be the best, you have to create a bat file that runs you node app.js. this bat file can easily be converted to windows exe using free tools such as battoexeconverter - as said by oussamalachiheb Commented Oct 31, 2015 at 22:26
  • I'm looking to a packaging solution to also include my node_modules , as I only want to publish one exec file Commented Nov 1, 2015 at 6:18

2 Answers 2

2

Electron itself can be built as .exe. Wouldn't make sense to pack it again. However when you have projects with non-native code use nexe.

Sign up to request clarification or add additional context in comments.

4 Comments

Well , I'm not using electron directly , I'm using nightmare js to automate some browser things , but it uses electron , hence why I have the bin folder. How should I pack it then ?
Nightmare is for testing. So if you don't need in "production" you can go with nexe.
Actually my whole code is around nightmare , and I don't use it as testing
Then I guess you can only use npm shrinkwrap. Should be fair enough.
0

Since i didnt find anything that can pack node js project with native dependencies into one exe file the workaround i found is to disctibute the node.js code with a package.js , and that the user will run npm install first , before using the package.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.