It is probably an issue with your web3 version. I guess you installed web3 v1.0. As of web3.js v1.0, you have to go through eth in order to reach personal from nodejs.

NOTE : You may not find many tutorials to start with web3 version 1.0 since it is not that stable, yet.

Go to migrations folder and edit1_initial_migration.jsfile by replacing web3.personal.unlockAccount(web3.eth.accounts[0], "passphrase"); with following line:-

web3.eth.personal.unlockAccount(web3.eth.accounts[0], “passphrase”);

This should help, else I would recommend using version web3@0.x

PS: I am using web3@0.20.7

Blockchain Enthusiast

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store