Coder Social home page Coder Social logo

enclose's People

Contributors

igorklopov avatar root-core avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

enclose's Issues

gulp-connect not working

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

Sail project does not run when it has models

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

sqlite3 error

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)

Got an error on centos 6.5

/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: versionGLIBC_2.14' not found (required by /usr/local/node/lib/node_modules/enclose/bin/enclose-v0.12.5-linux-x64-f2a83c0)

compilation warnings with expressjs and ectjs

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

Serialport example is not working

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

Packaging with bindings

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.

npm install -g enclose fails on windows

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

Problems with MongoDB, Consolidate

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.

image

So there are two issues i have to resolve.

  1. I have refactorize the require in MongoDB, the Enclose need a explicit path and here its loaded dynamically, but there are many methods...and really its no the only module i have this problem.

[ '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]);
}
});

  1. And for other side in the exportation of modules in Consolidate give the error "Cannot find module -name module- from path/consolidate/name_module", and when i check the "node-modules" of Consolidate, its empty. I dont know why...

Contextify support

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

Error with Mincer library

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!

Error when using nconf

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

path wrong on cli use

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

Missing require() dependencies (JSON files)

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.

Native dependencie node-sqlserver-unofficial, how face it

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

Allow require external modules

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%

not working with log4js-node

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?

Native lib

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'

Cannot compile http-server

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>)

Not working with backbone.radio

/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.

Documentation

Principles, CLI, Explicit scripts/assets, Troubleshooting ("thebox")

thrust_shell error while running in Windows

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.

Problem with http-server

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$ 

Nodegit support

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?

Not working with gulp

/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

compile.js error

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

Not working with node-forge

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.

Make encloseJS open source

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.

  1. How can we detect any code injection?
  2. We cannot understand the exact method of compilation?
  3. If there is code injected to convert our app to botnet, how can we know?
  4. If at some time you stop maintaining encloseJS, and we are dependant on it, then what will we do? Go back to using vanilla nodejs apps?
  5. Since its closed source nobody can make any improvements. It remains one-man effort only.
  6. Since its closed source the project may "die" if you stop maintaining it

All these fears and problems go away when its open source.
Also github is for open source projects.
Make encloseJS open source!!!!

Cannot run with bhttp

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.

https://github.com/joepie91/node-bhttp

Issues with Express

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)

image

argv[1] reported as "fake(argv[1])"

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)?

glob, configuration file?

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?

Why "thebox"?

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?

sequelize custom-event-emitter.js

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 ()

Socket.io with Enclose

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?

Typical bugs when using encloseJS

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?

Native modules support

Does enclose support native modules? Can it be packaged along with the executable or is it not supported at all?

code protection

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.

doesn't work on Windows

I was able to npm install, but when I tried to 'enclose' your test npm project, I get error: "cannot read file, EISDIR".

Problems with express

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.

Babel support

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?

[Error: ENOENT, lstat '/thebox/Path/ToFolder']

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? :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.