Pilothouse-App / Pilothouse

A command line app for managing a LEMP local development environment based on Docker.
http://pilothouse-app.org
GNU General Public License v2.0
98 stars 17 forks source link

padEnd is not a function error on pilothouse up #95

Closed csloisel closed 6 years ago

csloisel commented 6 years ago

Just updated to 0.11.2 and i'm not getting this error:

/usr/local/lib/node_modules/pilothouse/node_modules/yargs/yargs.js:1079
      else throw err
           ^

TypeError: phpVersion.toString(...).replace(...).padEnd is not a function
    at Object.formatPhpVersionBackend (/usr/local/lib/node_modules/pilothouse/utils/helpers.js:21:65)
    at buildNginxConfigForSite (/usr/local/lib/node_modules/pilothouse/utils/sites.js:51:38)
    at /usr/local/lib/node_modules/pilothouse/utils/sites.js:371:26
    at Array.forEach (native)
    at Object.updateSitesNginxConfig (/usr/local/lib/node_modules/pilothouse/utils/sites.js:370:8)
    at Object.buildRunFiles (/usr/local/lib/node_modules/pilothouse/utils/run.js:57:8)
    at Object.upCommand [as handler] (/usr/local/lib/node_modules/pilothouse/commands/up.js:18:6)
    at Object.self.runCommand (/usr/local/lib/node_modules/pilothouse/node_modules/yargs/lib/command.js:233:22)
    at Object.Yargs.self._parseArgs (/usr/local/lib/node_modules/pilothouse/node_modules/yargs/yargs.js:990:30)
    at Object.get [as argv] (/usr/local/lib/node_modules/pilothouse/node_modules/yargs/yargs.js:927:19)
philipnewcomer commented 6 years ago

@csloisel I suspect that your version of Node is outdated. The current LTS release of Node supports String.prototype.padEnd. Compare your version against http://node.green/#ES2017-features-String-padding-String-prototype-padEnd.

I am going to add a check to Pilothouse to verify that the Node version currently being used is sufficient.

csloisel commented 6 years ago

@philipnewcomer Thanks, That was the issue!