#Instead of installing it globally with the -g tag, #just install it locally in your current working directory. Just do: npm install jsonwebtoken --save #This is because you can not directly require a globally installed package in your code.