personal.lockAccount(web3.eth.accounts[0])
Error: Method not found
at web3.js:3104:20 at web3.js:6191:15 at web3.js:5004:36 at <anonymous>:1:1
You may try for this.
web3.eth.personal.lockAccount(address,passphrase)