shane-tomlinson / fxa-account-lock

Lock an Firefox Account from the command line
Other
0 stars 1 forks source link

TypeError: Object #<NodeFxAccountClient> has no method 'accountLock' #2

Open pdehaan opened 9 years ago

pdehaan commented 9 years ago

Odd, I tried running this with a fake email and clearly fake password, but got this weird TypeError:

$ node lock_account -e peter@deneloper.ca -p foobar
(https://stomlinson.dev.lcip.org/auth/v1) locking peter@deneloper.ca with foobar

/Users/pdehaan/dev/github/fxa-account-lock/lock_account.js:28
fxaClient.accountLock(email, password)
          ^
TypeError: Object #<NodeFxAccountClient> has no method 'accountLock'
    at Object.<anonymous> (/Users/pdehaan/dev/github/fxa-account-lock/lock_account.js:28:11)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:929:3

$ npm ls
fxa-lock-account@0.0.0 /Users/pdehaan/dev/github/fxa-account-lock
├─┬ commodore@0.0.1
│ └─┬ commander@1.1.1
│   └── keypress@0.1.0
└─┬ fxa-js-client@0.1.27
  ├── p-promise@0.3.2
  ├── sjcl@1.0.1 (git://github.com/bitwiseshiftleft/sjcl.git#a03ea8ef32329bc8d7bc28a438372b5acb46616b)
  └── xhr2@0.0.7

$ node -v; npm -v
v0.10.35
1.4.28
vladikoff commented 9 years ago

@pdehaan you need to use fxa-js-client 0.1.28

pdehaan commented 9 years ago

@vladikoff Weird, I just cloned this an hour ago and did a npm install (and then ran the above command (after running it without -e and -p flags to see if I'd get errors).

./package.json:13 Specifies fxa-js-client@~0.1.27. Should that be bumped to ~0.1.28? Not sure why it wouldn't have given me the later version of fxa-js-client.

pdehaan commented 9 years ago

Nevermind, this implodes hard if I attempt to manually install fxa-js-client@0.1.28:

$ npm i fxa-js-client@0.1.28

npm WARN package.json fxa-lock-account@0.0.0 No repository field.
npm ERR! Error: version not found: fxa-js-client@0.1.28
npm ERR!     at /usr/local/lib/node_modules/npm/lib/cache/add-named.js:125:12
npm ERR!     at saved (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:167:7)
npm ERR!     at Object.oncomplete (fs.js:108:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Darwin 14.1.0
npm ERR! command "node" "/usr/local/bin/npm" "i" "fxa-js-client@0.1.28"
npm ERR! cwd /Users/pdehaan/dev/github/fxa-account-lock
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/pdehaan/dev/github/fxa-account-lock/npm-debug.log
npm ERR! not ok code 0

Installing fxa-js-client@latest still seems to install 0.1.27. Looks like we haven't published 0.1.28 to npm yet. https://www.npmjs.com/package/fxa-js-client