Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'args.push is not a function' when trying to deploy #24

Closed
james-dowell opened this issue Mar 13, 2017 · 5 comments
Closed

'args.push is not a function' when trying to deploy #24

james-dowell opened this issue Mar 13, 2017 · 5 comments

Comments

@james-dowell
Copy link

Hello,

Apologies if this is not new but I have has look through the issues and can't see anything related.

I've been trying to use the CLI this morning but am getting the following error:

/Users/james/.nvm/versions/node/v6.2.0/lib/node_modules/netlify-cli/node_modules/commander/index.js:298
      args.push(self);
           ^

TypeError: args.push is not a function
    at Command.listener (/Users/james/.nvm/versions/node/v6.2.0/lib/node_modules/netlify-cli/node_modules/commander/index.js:298:12)
    at emitOne (events.js:101:20)
    at Command.emit (events.js:188:7)
    at Command.parseOptions (/Users/james/.nvm/versions/node/v6.2.0/lib/node_modules/netlify-cli/node_modules/commander/index.js:690:14)
    at Command.parse (/Users/james/.nvm/versions/node/v6.2.0/lib/node_modules/netlify-cli/node_modules/commander/index.js:455:21)
    at Object.<anonymous> (/Users/james/.nvm/versions/node/v6.2.0/lib/node_modules/netlify-cli/bin/cli.js:96:9)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)

As you can see I'm using node 6.2.0, I've also tried using node 0.12 just to see if it was something to do with node versions.

The command that I ran was netlify deploy dist -e testing which is what I have always run. Also worth noting that I installed netlify-cli today on my machine (just as it does on the CI I use where I saw the error originally)

I did suspect it might have been a package update - I've taken a look at commander but it doesn't seem to have changed that recently.

Any help on this would be greatly appreciated!

All the best,

James

@arochaf
Copy link

arochaf commented Mar 13, 2017

Can confirm, experiencing the same issue. Extremely annoying.
Could be due to this commit since the error is emitted by commander module:
5bfd93c

@maxdanilov
Copy link

Workaround is to use the previous version instead:
npm install netlify-cli@1.1.0

@wolframkriesing
Copy link

wolframkriesing commented Mar 14, 2017

Finally found that this package made our deploys fail, now I would be curious how to write a test for this bug? I didn't find the tests, help to find the tests appreciated.
Thanks for the workaround @maxdanilov ... works here

@darkcloud1801
Copy link

They just pushed out version 1.2.2 that fixes the issue. for me at least. I was using the -e attribute to target a specific environment

@bcomnes
Copy link
Contributor

bcomnes commented Aug 27, 2018

Glad this appeared to have cleared up. Feel free to reopen if this persists after the upcoming 2.0.0 launch.

@bcomnes bcomnes closed this as completed Aug 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants