If you get the following error when installing a nodejs package with npm such as 'npm install sqlite3':
npm ERR! must provide string spec
first run the following in the nodejs project:
npm init
Answer the questions and it will generate the package.json file, leaving the project ready to install nodejs modules with npm.