Thursday, 18 May 2017

How to add docker-cmd-js into the code?

I need to send a command to Docker and now I'm sure that I need this one https://github.com/DmitryEfimenko/docker-cmd-js to do what I need. (it makes 5hours that I'm looking how to do what I need)

So I runed meteor npm install --save gulp + meteor npm install --save docker-cmd-js and they are in my packages.json list.

Then in my code when I do var gulp = require("gulp"); I can start the app BUT when I add var dockerCmdJs = require("docker-cmd-js"); everything crash and I have this error:

W20170518-14:20:22.908(2)? (STDERR) /Users/ng/Desktop/mgmt-docker/.meteor/local/build/programs/server/packages/modules.js:28560
W20170518-14:20:22.909(2)? (STDERR)     static success(...message) {
W20170518-14:20:22.909(2)? (STDERR)                    ^^^
W20170518-14:20:22.909(2)? (STDERR)
W20170518-14:20:22.910(2)? (STDERR) SyntaxError: Unexpected token ...
W20170518-14:20:22.910(2)? (STDERR)     at Object.exports.runInThisContext (vm.js:53:16)
W20170518-14:20:22.910(2)? (STDERR)     at /Users/ng/Desktop/mgmt-docker/.meteor/local/build/programs/server/boot.js:287:30
W20170518-14:20:22.910(2)? (STDERR)     at Array.forEach (native)
W20170518-14:20:22.910(2)? (STDERR)     at Function._.each._.forEach (/Users/ng/.meteor/packages/meteor-tool/.1.4.1_1.fxh4sm++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20170518-14:20:22.911(2)? (STDERR)     at /Users/ng/Desktop/mgmt-docker/.meteor/local/build/programs/server/boot.js:128:5

What am I doing wrong in the insertion of this package ?

My app is running with Meteor

the error comes from this part https://github.com/DmitryEfimenko/docker-cmd-js/blob/92a4e5ed1f6dcb0eef1251c9a1c67a0e623625c0/dist/src/base.js but I can't modify it so I made something wrong in the install ? or something else ?



via Jerome

No comments:

Post a Comment