azukiapp/azk

TypeError: Object (npm install ) has no method 'join'

Closed this issue · 0 comments

Hi, I caught this problem in azk 0.16.2 when I was trying to install some dependencies using provision option. Ex.

When I try provision a single command, occurs the problem... ex.

systems({
    provision: [
      "npm install"
    ],

    ...
});

If I add more one command, it works!

systems({
    provision: [
      "npm install",
      "npm --version"
    ],

    ...
});

Exception

azk: ↻ provisioning `ui` system...
azk: TypeError: Object (npm install ) has no method 'join'
azk:     at Object.callee$1$0$ (/azk:0.16.2/src/system/run.js:57:64)
azk: From previous event:
azk:     at Object.async (/azk:0.16.2/src/utils/promises.js:31:31)
azk:     at Object.runProvision (/azk:0.16.2/src/system/run.js:4:17)
azk:     at System.runProvision (/azk:0.16.2/src/system/index.js:61:55)
azk:     at Object.callee$1$0$ (/azk:0.16.2/src/system/run.js:118:20)
azk:     at tryCatch (/usr/local/Cellar/azk/0.16.2/node_modules/babel-runtime/regenerator/runtime.js:65:40)
azk:     at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/Cellar/azk/0.16.2/node_modules/babel-runtime/regenerator/runtime.js:229:22)
azk:     at GeneratorFunctionPrototype.Gp.(anonymous function) [as next] (/usr/local/Cellar/azk/0.16.2/node_modules/babel-runtime/regenerator/runtime.js:262:19)
azk:     at process._tickCallback (node.js:448:13)
azk: Due to the above error azk will stop all instances already running.

azk: System `ui` not running

My host requisites

azk: 0.16.2
OSX Yosemite 10.10.4
MacBook Pro (Retina, 15-inch, Mid 2015)
Oracle VM VirtualBox Manager 4.3.30

My Azkfile.js

systems({
  ui: {
    // Dependent systems
    depends: [],
    // More images:  http://images.azk.io
    image: {"docker": "nodesource/wheezy:4.2.2"},
    // Steps to execute before running instances
    provision: [
      "npm install"
    ],
    workdir: "/azk/#{manifest.dir}",
    shell: "/bin/bash",
    command: "npm start",
    wait: false,
    mounts: {
      '/azk/#{manifest.dir}': path("."),
      '/azk/#{manifest.dir}/node_modules': persistent("./node_modules"),
    },
    scalable: {"default": 1},
    http: {
      domains: [ "#{system.name}.#{azk.default_domain}" ]
    },
    ports: {
      // exports global variables
      http: "8080/tcp"
    }
  }
});