igorklopov / enclose Goto Github PK
View Code? Open in Web Editor NEWCompile your Node.js project into an executable
Home Page: http://enclosejs.com
License: Other
Compile your Node.js project into an executable
Home Page: http://enclosejs.com
License: Other
Error: ENOENT: no such file or directory, open '/thebox/Users/.../node_modules/gulp-connect/node_modules/connect/node_modules/type-is/node_modules/mime/types/mime.types'
Seems it relative to connect in dictionary
Awesome project - just what i've been looking for!
Example 26 compiles ok - until you add a model to the project!
error: Trying to use unknown adapter, "sails-disk", in model `testmodel`.
error: Are you sure that adapter is installed in this Sails app?
error: If you wrote a custom adapter with identity="sails-disk", it should be in this app's adapters directory.
error: Otherwise, if you're trying to use an adapter named `sails-disk`, please run `npm install [email protected]`
Repro:
Start with example 26-sails
npm install to get dependencies
add testmodel.js to api/model/
// testmodel.js
module.exports = {
connection: 'localDiskDb',
attributes: {
myAtt: {
type: 'string',
},
}
};
Compile and run
I'm getting this error when trying to run my generated exe
undefined:0
Error: Cannot find module 'D:\Users\bb14193\Downloads\WorkFolder\node_modul
es\sqlite3\lib\binding\node-v14-win32-ia32\node_sqlite3.node'
at Error (native)
at O (:null:null)
at c (:null:null)
at Object.Math.Enclose.+d+:++t+h+e+b+o+x++U+s+e+r+s++b+b+1+4+1+9+3++D
+o+w+n+l+o+a+d+s++W+o+r+k+F+o+l+d+e+r++n+o+d+e+_+m+o+d+u+l+e+s++s+q+l+i+
t+e+3++l+i+b++s+q+l+i+t+e+3+.+j+s.dev (:null:null)
at u (:null:null)
at O (:null:null)
at c (:null:null)
at Object.Math.Enclose.+d+:++t+h+e+b+o+x++U+s+e+r+s++b+b+1+4+1+9+3++D
+o+w+n+l+o+a+d+s++W+o+r+k+F+o+l+d+e+r++a+p+p+.+j+s.dev (:null:
null)
at u (:null:null)
at :null:null
at Math.Enclose (:null:null)
at _third_party_main.js:1:76
at NativeModule.compile (node.js:805:5)
at Function.NativeModule.require (node.js:774:18)
at node.js:75:22
at process._tickCallback (node.js:355:11)
It would be really cool if you could add support for either the atom-shell and/or nwjs support for gui projects.
/usr/local/node/lib/node_modules/enclose/bin/enclose-v0.12.5-linux-x64-f2a83c0: /lib64/libc.so.6: version GLIBC_2.15' not found (required by /usr/local/node/lib/node_modules/enclose/bin/enclose-v0.12.5-linux-x64-f2a83c0) /usr/local/node/lib/node_modules/enclose/bin/enclose-v0.12.5-linux-x64-f2a83c0: /lib64/libc.so.6: version
GLIBC_2.14' not found (required by /usr/local/node/lib/node_modules/enclose/bin/enclose-v0.12.5-linux-x64-f2a83c0)
I'm getting these warning when trying to compile my project.
PS D:\Users\bb14193\Downloads\WorkFolder> enclose app.js
d:\Users\bb14193\Downloads\WorkFolder\node_modules\express\lib\view.js
warning Cannot resolve 'require(this.ext.substr(1))'
Use a string literal as argument for 'require', or leave it
as is and specify the resolved file name in 'scripts' option
d:\Users\bb14193\Downloads\WorkFolder\node_modules\ect\node_modules\coffee-
script\bin\coffee
warning Cannot resolve 'require(lib + '/coffee-script/command')'
Use a string literal as argument for 'require', or leave it
as is and specify the resolved file name in 'scripts' option
git clone https://github.com/igorklopov/enclose
cd enclose
npm install
cd examples/24-serialport
npm install
./compile.js
./index
Result
undefined:0
Error: Cannot find module '/Users/mo4islona/Projects/enclose/examples/24-serialport/node_modules/serialport/build/serialport/v1.7.4/Release/node-v14-darwin-x64/serialport.node'
at Error (native)
at O (<anonymous>)
at c (<anonymous>)
at Object.Math.Enclose.+/+t+h+e+b+o+x+/+U+s+e+r+s+/+m+o+4+i+s+l+o+n+a+/+P+r+o+j+e+c+t+s+/+e+n+c+l+o+s+e+/+e+x+a+m+p+l+e+s+/+2+4+-+s+e+r+i+a+l+p+o+r+t+/+n+o+d+e+_+m+o+d+u+l+e+s+/+s+e+r+i+a+l+p+o+r+t+/+s+e+r+i+a+l+p+o+r+t+.+j+s.dev (<anonymous>)
at u (<anonymous>)
at O (<anonymous>)
at c (<anonymous>)
at Object.Math.Enclose.+/+t+h+e+b+o+x+/+U+s+e+r+s+/+m+o+4+i+s+l+o+n+a+/+P+r+o+j+e+c+t+s+/+e+n+c+l+o+s+e+/+e+x+a+m+p+l+e+s+/+2+4+-+s+e+r+i+a+l+p+o+r+t+/+i+n+d+e+x+.+j+s.dev (<anonymous>)
at u (<anonymous>)
at <anonymous>
Module is compiled in node-v44-darwin-x64
not in node-v14-darwin-x64
file /Users/mo4islona/Projects/enclose/examples/24-serialport/node_modules/serialport/build/serialport/v1.7.4/Release/node-v44-darwin-x64/serialport.node
/Users/mo4islona/Projects/enclose/examples/24-serialport/node_modules/serialport/build/serialport/v1.7.4/Release/node-v44-darwin-x64/serialport.node: Mach-O 64-bit bundle x86_64
npm -v
2.11.0
iojs -v
v2.2.1
Does enclose support packaging node modules with C bindings?
As an example, I'm using https://github.com/joeferner/node-oracle, and when I'm trying to package app, I get the following error:
error Cannot find module '../build/Release/oracle_bindings' from '/node_modules/oracle/lib'
There is a file in the dirrectory:
/node_modules/oracle/build/Release/oracle_bindings.node
And it's linked via the followind:
var bindings = require("../build/Release/oracle_bindings");
It looks like enclose looks for something like oracle_bindings.js instead of oracle_bindings.node.
I get following error on windows, has anyone had this issue?
[email protected] postinstall C:\Users\User\AppData\Roaming\npm\node_modules\e
nclose
node postinstall.js
Downloading precompiled binaries. Please wait ...
Downloading enclose-v0.12.4-win32-41280ee.exe ... 10% 20% 30% 40% 50% 60% 70% 80
% 90%
Downloading mksnapshot-v0.12.4-win32-41280ee.exe ...
C:\Users\Praveen\AppData\Roaming\npm\node_modules\enclose\postinstall.js:131
throw error;
^
Error: getaddrinfo ENOTFOUND enclosejs.s3.amazonaws.com, mksnapshot-v0.12.4-win3
2-41280ee.exe
at C:\Users\Praveen\AppData\Roaming\npm\node_modules\enclose\postinstall.js:
74:18
at C:\Users\Praveen\AppData\Roaming\npm\node_modules\enclose\postinstall.js:
67:13
at process._tickCallback (node.js:355:11)
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs
\node_modules\npm\bin\npm-cli.js" "install" "-g" "enclose"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] postinstall: node postinstall.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node postinstall.js'.
npm ERR! This is most likely a problem with the enclose package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node postinstall.js
npm ERR! You can get their info via:
npm ERR! npm owner ls enclose
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\User\Praveen\Downloads\stress-test\src\npm-debug.log
Hello i try to make a executable version of my project Mean.JS (http://meanjs.org/) but i have a problem with the exports of MongoDB and Consolidate, i make a screenshot of this situation.
So there are two issues i have to resolve.
[ 'commands/base_command'
, 'admin'
, 'collection'
, 'connection/read_preference'
, 'connection/connection'
, 'connection/server'
, 'connection/mongos'
, 'connection/repl_set/repl_set'
, 'mongo_client'
, 'cursor'
, 'db'
, 'mongo_client'
, 'gridfs/grid'
, 'gridfs/chunk'
, 'gridfs/gridstore'].forEach(function (path) {
var module = require('./' + path);
for (var i in module) {
exports[i] = module[i];
console.log(exports[i]);
}
});
The "use strict" usage seems to be ignored when compiling with enclose. For example, the code below:
"use strict";
let test = true;
Is failing with:
Failure compiling
Uncaught SyntaxError: Unexpected strict mode reserved word at line 22
let test = true;
^^^^
Here is a sample project:
https://drive.google.com/file/d/0B-ZXYfeVKweHbTh5LVpwWDY0NmM/view?usp=sharing
Index.js
var Contextify = require('contextify');
var sandbox = { console : console, prop1 : 'prop1'};
Contextify(sandbox);
sandbox.run('console.log(prop1);');
sandbox.dispose();
Contextify use https://github.com/TooTallNate/node-bindings to load native module contextify.node
After compilation
Error: Could not locate the bindings file. Tried:
→ /Users/mo4islona/Projects/enclose/examples/contextify/build/contextify.node
→ /Users/mo4islona/Projects/enclose/examples/contextify/build/Debug/contextify.node
→ /Users/mo4islona/Projects/enclose/examples/contextify/build/Release/contextify.node
→ /Users/mo4islona/Projects/enclose/examples/contextify/out/Debug/contextify.node
→ /Users/mo4islona/Projects/enclose/examples/contextify/Debug/contextify.node
→ /Users/mo4islona/Projects/enclose/examples/contextify/out/Release/contextify.node
→ /Users/mo4islona/Projects/enclose/examples/contextify/Release/contextify.node
→ /Users/mo4islona/Projects/enclose/examples/contextify/build/default/contextify.node
→ /Users/mo4islona/Projects/enclose/examples/contextify/compiled/0.12.4/darwin/x64/contextify.node
at bindings (<anonymous>)
at Object.Math.Enclose.+/+t+h+e+b+o+x+/+U+s+e+r+s+/+m+o+4+i+s+l+o+n+a+/+P+r+o+j+e+c+t+s+/+e+n+c+l+o+s+e+/+e+x+a+m+p+l+e+s+/+c+o+n+t+e+x+t+i+f+y+/+n+o+d+e+_+m+o+d+u+l+e+s+/+c+o+n+t+e+x+t+i+f+y+/+l+i+b+/+c+o+n+t+e+x+t+i+f+y+.+j+s.dev (<anonymous>)
at u (<anonymous>)
at O (<anonymous>)
at c (<anonymous>)
at Object.Math.Enclose.+/+t+h+e+b+o+x+/+U+s+e+r+s+/+m+o+4+i+s+l+o+n+a+/+P+r+o+j+e+c+t+s+/+e+n+c+l+o+s+e+/+e+x+a+m+p+l+e+s+/+c+o+n+t+e+x+t+i+f+y+/+i+n+d+e+x+.+j+s.dev (<anonymous>)
at u (<anonymous>)
at <anonymous>
at Math.Enclose (<anonymous>)
at _third_party_main.js:1:76
Hello,
I wanted to try out enclose on my sails app, but I'm running into errors with a module I'm using, mincer:
/sails-app/node_modules/mincer/lib/mincer/engines/handlebars_engine.js
error Cannot find module 'handlebars' from '/sails-app/node_modules/mincer/lib/mincer/engines'
/sails-app/node_modules/mincer/lib/mincer/engines/jade_engine.js
error Cannot find module 'jade' from '/sails-app/node_modules/mincer/lib/mincer/engines'
/sails-app/node_modules/mincer/lib/mincer/engines/stylus_engine.js
error Cannot find module 'stylus' from '/sails-app/node_modules/mincer/lib/mincer/engines'
/sails-app/node_modules/mincer/lib/mincer/processors/autoprefixer.js
error Cannot find module 'autoprefixer-core' from '/sails-app/node_modules/mincer/lib/mincer/processors'
/sails-app/node_modules/mincer/lib/mincer/compressors/csso_compressor.js
error Cannot find module 'csso' from '/sails-app/node_modules/mincer/lib/mincer/compressors'
I'm using the example sails app compile script: https://github.com/igorklopov/enclose/blob/master/examples/26-sails/compile.js
How would I modify it to ignore those requires in that module?
Thanks!
See sample https://gist.github.com/sergn-n/45d27a2344db2dfe7b28
When runnig app.exe built with enclose (enc.bat) error is:
d:\projects\enclose-test>app.exe --foo xyz987
fs.js:761
return binding.readdir(pathModule.makeLong(path));
^
Error: ENOENT, no such file or directory 'd:\thebox\projects\enclose-test\node_modules\nconf\lib\nconf\stores'
at Error (native)
at Object.fs.readdirSync (fs.js:761:18)
at Object.Math.Enclose.+s+t+u+b+:+/+/+f+s.fs.readdirSync ()
at Object.Math.Enclose.+d+:++t+h+e+b+o+x++M+y+D+o+c+s++N+o+d+e+.+j+s++p+r+o+j+e+c+t+s++e+n+c+l+o+s+e+-+t+e+s+t++n+o+d+e++m+o+d+u+l+e+s++n+c+o+n+f++l+i+b++n+c+o+n+f+.+j+s.dev ()
at r ()
at N ()
at f ()
at Object.Math.Enclose.+d+:++t+h+e+b+o+x++M+y+D+o+c+s++N+o+d+e+.+j+s++p+r+o+j+e+c+t+s++e+n+c+l+o+s+e+-+t+e+s+t++a+p+p+.+j+s.dev ()
at r ()
at
I tried:
enclose server.js
then I have a new file server which I can execute:
./server
Result:
fs.js:502
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT, no such file or directory '/thebox/then/my/path/and/another.js'
My path is prefixed with /thebox/ !
Thanks,
Karsten
It seems require(...)
calls that don't use simple strings as a module path are not resolved (and not included in the generated binary).
Example:
var jsPath = "../some/path/";
var jsModule = require(jsPath + "test");
Will throw an unhandled path not found exception. Is there any known workaround for including dependencies that cannot be referenced with plain strings? Could I use the --config
option and scripts
callback as a workaround? The docs are a bit lacking on the config option right now, not sure how to approach this.
Hi, i try to make executable version of my project which include a node-sqlserver-unofficial (https://www.npmjs.com/package/node-sqlserver-unofficial).
var enclose = require("enclose").exec;
var flags = [];
var x64 = process.arch === "x64";
if (x64) flags.push("--x64");
try {
require.resolve("./node-sqlserver-unofficial");
} catch(error) {
console.log("Failed to require('node-sqlserver-unofficial')");
console.log("Please run 'npm install' here");
process.exit(1);
}
flags.push("./index.js");
enclose(flags);
I can make the executable, but in my system i got dependencies for 'node-sqlserver-unofficial' and this folder got a 'javascript' file and one native module (.node). "I think" i have to call this native module from this "javascript" file and the native module MUST be outside the package, otherwise the package its not created.
So i need to call the dependence
sql = require('node-sqlserver-unofficial'),
In nodemodules/node-sqlserver-unofficial, i suppose the 'root' its gonna be the same 'root' of my executable file.
module.exports= require('./bin/0.10-x64/sqlserver.node');
When i compile, i obtain this warning:
$ node compile.js
c:\Users\EstebanFrancisco\Proyectos\dest_V2\node_modules\node-sqlserver-unoffici
al\lib\bin\0.10-x64\sqlserver.node
warning Cannot include native addon into executable
The addon package must be distributed with executable
c:\Users\EstebanFrancisco\Proyectos\dest_V2\node_modules\scribe-js\node_modules\
colors\lib\colors.js
warning Cannot resolve 'require(theme)'
Use a string literal as argument for 'require', or leave it
as is and specify the resolved file name in 'scripts' option
Many problems there: "Not working with moduleA or moduleB or moduleC, e. t. c."
Introduce support for each of (168533 now modules) seems long time...
Maybe simply allow require module as is from existing node_modules or other external path from file system?
When I try:
enclose --nobundle --version 2.3.4 index.js
Or even:
enclose --nobundle --version 2.3.4 --config config.js index.js
Where config.js:
module.exports = {
dirs: ["./node_modules"]
};
Result:
node.js:879
throw new Error('No such native module ' + id);
^
Error: No such native module %module_name%
hi,
i use log4js to log some info and whichever log file path i fill in the config file
it always cause a ENOENT error,the result path is append /thebox prefix.
is it a bug or i made some stupid mistake?
Hello !
Some natives module can't be compiled, I used nodejs v0.12.0
and enclose without any arguments beside the app name, any idea how to solve this?
... some output...
error Cannot find module '../build/Debug/addon' from '/www/my-app/node_modules/heapdump/lib'
Then after removing the optional heapdump:
... some output...
error Cannot find module 'msgpack' from '/www/my-app/node_modules/socket.io/lib/stores'
Please try to compile this program and then run it.
On MacOS it returns error: "Segmentation fault: 11"
While under node it finishes successfully.
The code: http://pastebin.com/3QLcAdUt
https://github.com/indexzero/http-server
git clone [email protected]:indexzero/http-server.git
cd http-server
enclose --loglevel info -x -o bin/http-server-standalone ./lib/http-server.js
./bin/http-server-standalone
Error Message:
./bin/http-server-standalone
undefined:0
TypeError: Cannot set property 'createProxy' of undefined
at Object.Math.Enclose.+/+t+h+e+b+o+x+/+U+s+e+r+s+/+t+y+l+e+r+l+o+n+g+/+s+r+c+/+j+s+/+h+t+t+p+-+s+e+r+v+e+r+/+n+o+d+e+_+m+o+d+u+l+e+s+/+h+t+t+p+-+p+r+o+x+y+/+l+i+b+/+h+t+t+p+-+p+r+o+x+y+.+j+s.dev (<anonymous>)
at u (<anonymous>)
at O (<anonymous>)
at c (<anonymous>)
at Object.Math.Enclose.+/+t+h+e+b+o+x+/+U+s+e+r+s+/+t+y+l+e+r+l+o+n+g+/+s+r+c+/+j+s+/+h+t+t+p+-+s+e+r+v+e+r+/+n+o+d+e+_+m+o+d+u+l+e+s+/+h+t+t+p+-+p+r+o+x+y+/+i+n+d+e+x+.+j+s.dev (<anonymous>)
at u (<anonymous>)
at O (<anonymous>)
at c (<anonymous>)
at Object.Math.Enclose.+/+t+h+e+b+o+x+/+U+s+e+r+s+/+t+y+l+e+r+l+o+n+g+/+s+r+c+/+j+s+/+h+t+t+p+-+s+e+r+v+e+r+/+l+i+b+/+h+t+t+p+-+s+e+r+v+e+r+.+j+s.dev (<anonymous>)
at u (<anonymous>)
/thebox/Users/.../node_modules/backbone.radio/build/backbone.radio.js:336
//# sourceMappingURL=./backbone.radio.js.map})
SyntaxError: Unexpected end of input
Seems it buggy due to sourcemap path.
Principles, CLI, Explicit scripts/assets, Troubleshooting ("thebox")
Hi,
I installed enclose and node-thrust, and tested the index.js below in Windows 7 SP1.
var thrust = require('node-thrust');
thrust(function(error, api) {
var window = api.window({
root_url: 'https://www.google.com',
size: {
width: 1000,
height: 600
}
});
window.show();
window.focus();
});
It worked if I run "node index.js", but it displayed the following error if I run "index.exe" after compiled it by "enclose index.js".
[2015-07-08T03:38:19.148Z] SPAWING d:\thebox\demo\node_modules\node-thrust\vendor\thrust\thrust_shell
events.js:85
throw er; // Unhandled 'error' event
^
Error: spawn d:\thebox\demo\node_modules\node-thrust\vendor\thrust\thrust_shell ENOENT
at exports._errnoException (util.js:746:11)
at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
at child_process.js:1144:20
at process._tickCallback (node.js:355:11)
Thanks for any help.
Can you provide arm binaries?
https://github.com/indexzero/http-server
Nothing happends when executing the final binary
Tylers-Mac-mini:http-server tylerlong$ ./bin/http-server
Starting up http-server, serving ./public on: http://0.0.0.0:8080
Available on:
http://127.0.0.1:8080
http://192.168.1.13:8080
Hit CTRL-C to stop the server
^Chttp-server stopped.
Tylers-Mac-mini:http-server tylerlong$ enclose --loglevel info -x -o bin/http-server-standalone ./lib/http-server.js
/Users/tylerlong/src/test/http-server/node_modules/union/lib/core.js
error Cannot find module 'spdy' from '/Users/tylerlong/src/test/http-server/node_modules/union/lib'
Tylers-Mac-mini:http-server tylerlong$ npm install spdy
npm WARN package.json [email protected] No repository field.
[email protected] node_modules/spdy
Tylers-Mac-mini:http-server tylerlong$ ./bin/http-server
Starting up http-server, serving ./public on: http://0.0.0.0:8080
Available on:
http://127.0.0.1:8080
http://192.168.1.13:8080
Hit CTRL-C to stop the server
^Chttp-server stopped.
Tylers-Mac-mini:http-server tylerlong$ enclose --loglevel info -x -o bin/http-server-standalone ./lib/http-server.js
/Users/tylerlong/src/test/http-server/lib/http-server.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/union/package.json
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/union/lib/index.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/ecstatic/package.json
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/ecstatic/lib/ecstatic.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/http-proxy/package.json
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/http-proxy/index.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/corser/package.json
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/corser/lib/corser.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/union/lib/buffered-stream.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/union/lib/http-stream.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/union/lib/response-stream.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/union/lib/routing-stream.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/union/lib/core.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/ecstatic/node_modules/mime/package.json
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/ecstatic/node_modules/mime/mime.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/ecstatic/node_modules/url-join/package.json
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/ecstatic/node_modules/url-join/lib/url-join.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/ecstatic/lib/ecstatic/showdir.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/ecstatic/lib/ecstatic/status-handlers.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/ecstatic/lib/ecstatic/etag.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/ecstatic/lib/ecstatic/opts.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/ecstatic/node_modules/minimist/package.json
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/ecstatic/node_modules/minimist/index.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/http-proxy/lib/http-proxy.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/union/node_modules/qs/package.json
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/union/node_modules/qs/index.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/union/lib/request-stream.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/spdy/package.json
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/spdy/lib/spdy.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/ecstatic/node_modules/mime/types.json
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/ecstatic/node_modules/he/package.json
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/ecstatic/node_modules/he/he.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/http-proxy/lib/http-proxy/index.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/union/node_modules/qs/lib/index.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/spdy/lib/spdy/utils.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/spdy/lib/spdy/protocol/index.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/spdy/lib/spdy/response.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/spdy/lib/spdy/scheduler.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/spdy/lib/spdy/zlib-pool.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/spdy/lib/spdy/stream.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/spdy/lib/spdy/connection.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/spdy/lib/spdy/server.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/spdy/lib/spdy/client.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/http-proxy/node_modules/eventemitter3/package.json
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/http-proxy/node_modules/eventemitter3/index.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/union/node_modules/qs/lib/stringify.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/union/node_modules/qs/lib/parse.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/spdy/lib/spdy/protocol/dictionary.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/spdy/lib/spdy/protocol/constants.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/spdy/lib/spdy/protocol/parser.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/spdy/lib/spdy/protocol/framer.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/http-proxy/lib/http-proxy/passes/web-outgoing.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/http-proxy/lib/http-proxy/common.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/union/node_modules/qs/lib/utils.js
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/http-proxy/node_modules/requires-port/package.json
info The file was included into output executable as js code
/Users/tylerlong/src/test/http-server/node_modules/http-proxy/node_modules/requires-port/index.js
info The file was included into output executable as js code
Tylers-Mac-mini:http-server tylerlong$ ./bin/http-server
Starting up http-server, serving ./public on: http://0.0.0.0:8080
Available on:
http://127.0.0.1:8080
http://192.168.1.13:8080
Hit CTRL-C to stop the server
^Chttp-server stopped.
Tylers-Mac-mini:http-server tylerlong$
Tylers-Mac-mini:http-server tylerlong$ ./bin/http-server-standalone
Tylers-Mac-mini:http-server tylerlong$
When I am trying to compile my app with nodegit I get the following warnings/errors:
projects/blame-history/node_modules/nodegit/lib/nodegit.js
warning Cannot resolve 'require("./" + name)'
Use a string literal as argument for 'require', or leave it
as is and specify the resolved file name in 'scripts' option
projects/blame-history/node_modules/nodegit/node_modules/promisify-node/index.js
warning Cannot resolve 'require(name)'
Use a string literal as argument for 'require', or leave it
as is and specify the resolved file name in 'scripts' option
projects/blame-history/node_modules/nodegit/build/Release/nodegit.node
warning Cannot include native addon into executable
The addon package must be distributed with executable
So I guess to get over the first two warnings I would ideally find out what the name
can resolve to and then list it in the scripts
option right? Is there any documentation on the scripts option? I couldn't find anything.
And not quite sure about the last one. I have seen the section on native addons, but don't quite understand. When I run the app I get the following error:
Error: dlopen(/Users/markus/Projects/blame-history/node_modules/nodegit/build/Release/nodegit.node, 1): no suitable image found. Did find:
/Users/markus/Projects/blame-history/node_modules/nodegit/build/Release/nodegit.node: mach-o, but wrong architecture
at Error (native)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at G (<anonymous>)
at N (<anonymous>)
at c (<anonymous>)
at Object.Math.Enclose.+/+t+h+e+b+o+x+/+U+s+e+r+s+/+m+a+r+k+u+s+/+P+r+o+j+e+c+t+s+/+b+l+a+m+e+-+h+i+s+t+o+r+y+/+n+o+d+e+_+m+o+d+u+l+e+s+/+n+o+d+e+g+i+t+/+l+i+b+/+n+o+d+e+g+i+t+.+j+s (<anonymous>)
at u (<anonymous>)
Does that mean it has been built for the wrong node/iojs?
/Users/darky/Desktop/tavmant/node_modules/gulp/bin/gulp.js
warning Cannot resolve 'require(env.configPath)'
Use a string literal as argument for 'require', or leave it
as is and specify the resolved file name in 'scripts' option
/Users/darky/Desktop/tavmant/node_modules/gulp/bin/gulp.js
warning Cannot resolve 'require(env.modulePath)'
Use a string literal as argument for 'require', or leave it
as is and specify the resolved file name in 'scripts' option
/Users/darky/Desktop/tavmant/node_modules/gulp/node_modules/liftoff/index.js
warning Cannot resolve 'require(resolve.sync(module, {basedir: basedir}))'
Use a string literal as argument for 'require', or leave it
as is and specify the resolved file name in 'scripts' option
/Users/darky/Desktop/tavmant/node_modules/gulp/node_modules/v8flags/index.js
warning Cannot resolve 'require(configpath)'
Use a string literal as argument for 'require', or leave it
as is and specify the resolved file name in 'scripts' option
/Users/darky/Desktop/tavmant/node_modules/gulp/node_modules/liftoff/lib/silent_require.js
warning Cannot resolve 'require(path)'
Use a string literal as argument for 'require', or leave it
as is and specify the resolved file name in 'scripts' option
/Users/darky/Desktop/tavmant/node_modules/gulp/node_modules/liftoff/node_modules/rechoir/lib/register.js
warning Cannot resolve 'require(modulePath)'
Use a string literal as argument for 'require', or leave it
as is and specify the resolved file name in 'scripts' option
hi,
i use serialport and xml2json which both load native module,
and i found example in the reposity like this
var enclose = require("../../").exec;
try {
require.resolve("serialport");
} catch(error) {
console.log("Failed to require('serialport')");
console.log("Please run 'npm install' here");
process.exit(1);
}
enclose(flags);
but i got a error cant find module ("../../")
i'm a newbie to nodejs and i dont quite understand require('"../../") means
I got this error when run enclose with node-forge module inside my script
info Cannot resolve 'require(dep)'
Use a string literal as argument for 'require', or leave it
as is and specify the resolved file name in 'scripts' option
I can fix by creating a new file dictionary/node-forge.js as following
module.exports = {
scripts: [
"js/*.js"
]
};
but the problem is it still shows many warning. so i assume i'm not fixing it correctly.
It would be super convenient to have the capability to compile the application with a list of command line options to run against Node.
I would like to expose garbage collection in my app, which requires me to pass in a command line option to node ("--expose-gc") before global.gc () becomes available.
https://simonmcmanus.wordpress.com/2013/01/03/forcing-garbage-collection-with-node-js-and-v8/
Consider making encloseJS open source. I understand you would like to build a commercial product out of it, but the concerns will be the same.
All these fears and problems go away when its open source.
Also github is for open source projects.
Make encloseJS open source!!!!
I can compile my application fine, but when I try to run it this happens:
fs.js:500
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT, no such file or directory '/thebox/home/kevin/Documents/Projects/NIM/node_modules/bhttp/node_modules/errors/lib/static/error.css'
at Error (native)
at Object.fs.openSync (fs.js:500:18)
at Object.fs.readFileSync (fs.js:352:15)
at Object.Math.Enclose.+s+t+u+b+:+/+/+f+s.fs.readFileSync (<anonymous>)
at Object.Math.Enclose.+/+t+h+e+b+o+x+/+h+o+m+e+/+k+e+v+i+n+/+D+o+c+u+m+e+n+t+s+/+P+r+o+j+e+c+t+s+/+N+I+M+/+n+o+d+e+_+m+o+d+u+l+e+s+/+b+h+t+t+p+/+n+o+d+e+_+m+o+d+u+l+e+s+/+e+r+r+o+r+s+/+l+i+b+/+e+r+r+o+r+s+.+j+s.dev (<anonymous>)
at u (<anonymous>)
at O (<anonymous>)
at c (<anonymous>)
at Object.Math.Enclose.+/+t+h+e+b+o+x+/+h+o+m+e+/+k+e+v+i+n+/+D+o+c+u+m+e+n+t+s+/+P+r+o+j+e+c+t+s+/+N+I+M+/+n+o+d+e+_+m+o+d+u+l+e+s+/+b+h+t+t+p+/+n+o+d+e+_+m+o+d+u+l+e+s+/+e+r+r+o+r+s+/+i+n+d+e+x+.+j+s.dev (<anonymous>)
at u (<anonymous>)
at O (<anonymous>)
at c (<anonymous>)
at Object.Math.Enclose.+/+t+h+e+b+o+x+/+h+o+m+e+/+k+e+v+i+n+/+D+o+c+u+m+e+n+t+s+/+P+r+o+j+e+c+t+s+/+N+I+M+/+n+o+d+e+_+m+o+d+u+l+e+s+/+b+h+t+t+p+/+l+i+b+/+b+h+t+t+p+.+j+s.dev (<anonymous>)
at u (<anonymous>)
at O (<anonymous>)
at c (<anonymous>)
I'm not entirely sure what's happening here. The "thebox" in the path does not exist, but after that the rest of the path is correct. The application runs just fine if you call it normally.
Hi, i got this error. When i compile i dont have any warning or error, but when i execute the final executable obtain an error for 'express'. Can you check it?.
Or maybe is a different error?. My project is based in MEAN.JS (http://meanjs.org/), but i removed the mongodb part and put a mssql-tedious connection (https://bitbucket.org/randomerp/random-stack/overview). In config/ folder i have to edit explicit 'require' . Too in express/lib/view.js and consolidate (edit_node_modules folder)
A minor issue where the second array element of process.argv
is always reported as a "fake(argv[1])" string (should be currently executing script path). Maybe as a workaround enclose could set this value to the one passed in the command-line (when compiling)?
hi, im running into an issue, i would like to add assets to the file, in the readme it says defining the assets as a glob in the configuration file, but i cant find anything about a configuration file, which one is it? how would an example look like?
I'm currently experimenting with enclose in an effort to compile a commercial product. However, I have encountered some problems and can't continue the evaluation.
My main obstacle: "thebox"
Why are you adding "thebox" in paths?
i have this error with sequelize module in my node app
C:\Users\Ahmad.Kabakibi\Desktop\My Projects\Web Application\Node Player\Tool
s Node\Binary>Player.exe
config file:C:\Users\Ahmad.Kabakibi\Desktop\My Projects\Web Application\Node
Player\Tools Node\Binary\config.ini
undefined:0
Error: Cannot find module 'c:\thebox\Users\Ahmad.Kabakibi\Desktop\My Projects\Web Application\Node Player\Tools Node\Binary\node_modules\sequelize
\lib/emitters/custom-event-emitter'
at Error (native)
at O ()
at c ()
at Object.Math.Enclose.+c+:++t+h+e+b+o+x++U+s+e+r+s++A+h+m+a+d+.+K+a+b+a+
k+i+b+i++D+e+s+k+t+o+p++M+y+ +P+r+o+j+e+c+t+s+ +S+M+G++W+e+b+ +A+p+p+l+i+c+a+
t+i+o+n++N+o+d+e+ +P+l+a+y+e+r++T+o+o+l+s+ +N+o+d+e++B+i+n+a+r+y++S+M+G+P+l+
a+y+e+r++n+o+d+e++m+o+d+u+l+e+s++s+e+q+u+e+l+i+z+e++l+i+b++u+t+i+l+s+.+j+s.
dev ()
at u ()
at O ()
at c ()
at Object.Math.Enclose.+c+:++t+h+e+b+o+x++U+s+e+r+s++A+h+m+a+d+.+K+a+b+a+
k+i+b+i++D+e+s+k+t+o+p++M+y+ +P+r+o+j+e+c+t+s+ +S+M+G++W+e+b+ +A+p+p+l+i+c+a+
t+i+o+n++N+o+d+e+ +P+l+a+y+e+r++T+o+o+l+s+ +N+o+d+e++B+i+n+a+r+y++S+M+G+P+l+
a+y+e+r++n+o+d+e++m+o+d+u+l+e+s++s+e+q+u+e+l+i+z+e++l+i+b++s+e+q+u+e+l+i+z+
e+.+j+s.dev ()
at u ()
at O ()
EDIT: After tweeking I have it 'working' as such. The problem I now face is the actual referencing of socket.io folder location is not correct. For example the correct location is : 'D:/Projects/EncloseTest/bin/node_modules/socket.io/...' and after compiling the .exe it can not reference socket.io since it has the folder location of 'd:/thebox/Projects/EncloseTest/bin/node_modules/socket.io/..'. In short it prefixes the folder location with '/thebox//'.
I was attempting to use the Enclose with Socket.io, but when trying to compile I could not come across a solution. I've tried resolving socket.io in the compile script, using the config for scripts.
The output from the compile script is below.
...\bin\node_modules\socket.io\node_modules\engine.io\node_modules\accepts\node_
les\negotiator\lib\negotiator.js
warning Cannot resolve 'require('./'+k+'.js')'
Use a string literal as argument for 'require', or leave it
as is and specify the resolved file name in 'scripts' option
...\bin\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modul
ufferutil\node_modules\bindings\bindings.js
warning Cannot resolve 'require(n)'
Use a string literal as argument for 'require', or leave it
as is and specify the resolved file name in 'scripts' option
...\bin\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modul
tf-8-validate\node_modules\bindings\bindings.js
warning Cannot resolve 'require(n)'
Use a string literal as argument for 'require', or leave it
as is and specify the resolved file name in 'scripts' option
...\bin\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine
client\node_modules\ws\node_modules\bufferutil\node_modules\bindings\bindings.js
warning Cannot resolve 'require(n)'
Use a string literal as argument for 'require', or leave it
as is and specify the resolved file name in 'scripts' option
...\bin\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine
client\node_modules\ws\node_modules\utf-8-validate\node_modules\bindings\bindings.js
warning Cannot resolve 'require(n)'
Use a string literal as argument for 'require', or leave it
as is and specify the resolved file name in 'scripts' option
Could you advise me on what to do?
What are the typical bugs that arise when using encloseJS?
What are required changes in nodejs apps when using encloseJS?
1, Will there be memory leaks?
2. Will there be random crashes/bugs in our applications?
3. Will there be memory corruption occurring?
4. Will events fire properly?
5. Are you running any unit tests to confirm 100% perfect behaviour compared to vanilla node?
6. I'm using encloseJS to package a binary socket server. How can I test if everything is ok compared to vanilla nodejs?
Does enclose support native modules? Can it be packaged along with the executable or is it not supported at all?
Can't get it to work with winston logging library:
Error: ENOENT, no such file or directory
Tried using "dirs" option to include all the required dirs - but still getting the same error. Something is up with "pkginfo" library that winston has a depending on. What could be the problem here?
Please see a sample project:
https://drive.google.com/file/d/0B-ZXYfeVKweHSC1TY2Z6X0x4akE/view?usp=sharing
If you are using V8's serializer/deserializer to implement enclose.js, then the source code is not really protected. It has to be included, and as such, can be read out if you know where to look.
I was able to npm install, but when I tried to 'enclose' your test npm project, I get error: "cannot read file, EISDIR".
Hello,
Completely new to node.js and all this, but I seem to have some problems that might not be because of me! :-) I'm getting this error when running: "enclose yoxy.js"
d:\yoxy\node_modules\express\lib\view.js
warning Cannot resolve 'require(ext.slice(1))'
Use a string literal as argument for 'require', or leave it
as is and specify the resolved file name in 'scripts' option
Is this something that can be fixed by me, or is it Enclosure that causes the trouble?
I'm using express, request and concat-stream all installed using the "npm install"-command.
// Yoc.
In most of my projects that are not performance critical I am using Babel. Just tried out enclose one of these projects but it has issues at least with ES7 syntax, e.g. module.exports = async function (cmdArgs) {
.
The file that I am building has babel defined as follows:
//run.js
require('babel/register')({
experimental: true,
loose: true
});
var nodegitFile = require('./nodegit');
nodegitFile(['tests/fixtures/example.txt']);
and running node run.js
works fine.
The error I am getting:
project/blame-history/nodegit.js
error Unexpected token (5:23)
which is just after the async
token.
Any chance to get enclose to support Babel?
Hello there, I can't help but assume I'm doing something dumb here.. but I can't figure it out :)
I have a node project that effectively creates a new folder on the user's machine and copies files into it. Consider this config file:
module.exports = {
scripts: [
'./index.js'
],
assets: [
'./templates/plugin/README.md',
'./templates/project/*.*', './templates/project/bin/*.*', './templates/project/test/*.*',
'./templates/plugin/*.*', './templates/plugin/test/*.*'
],
dirs: [
'./templates/project', './templates/project/bin', './templates/project/test',
'./templates/plugin', './templates/plugin/test'
]
};
Creating the binary works OK. Running it, to an extent, is also OK -- as in, my CLI options echo out and what not. But when I actually try to call the method that copies the files from the template into a new folder, I get this:
[ { [Error: ENOENT, lstat '/thebox/Path/To/Stuff/templates/project']
errno: -2,
code: 'ENOENT',
path: '/thebox/Path/To/Stuff/templates/project' } ]
However, I am seeing the following when I run enclose
which makes me think things are working OK:
/Path/To/Stuff/templates/plugin/.DS_Store
info The file was included into output executable as raw content
Any ideas? :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.