I am new to Node.js and hitting this problem on my DigitalOcean VPS, where my web app (Ghost) complains it can't find specific modules even after I install it:
root@3fen:/var/www/ghost# sudo npm install -g ghost-gql
ghost-gql@0.0.2 /usr/local/lib/node_modules/ghost-gql
└── lodash@3.10.1
root@3fen:/var/www/ghost# node index.js
ERROR: Ghost is unable to start due to missing dependencies:
Cannot find module 'ghost-gql'
Cannot find module 'jsonpath'
Please run `npm install --production` and try starting Ghost again.
Help and documentation can be found at http://support.ghost.org.
I confirmed that both entries exist in package.json
's dependencies block, and I also tried npm install --production
, it executes silently and still get the same error.
Please point me if I am missing anything in the above steps. Thank you!