TryGhost / Ghost

Independent technology for modern publishing, memberships, subscriptions and newsletters.
https://ghost.org
MIT License
46.27k stars 10.11k forks source link

Cannot install node modules from an openshift/ghost git repo under node 0.12 #6360

Closed jayjayjpg closed 8 years ago

jayjayjpg commented 8 years ago

I had the issue that I wasn't able to install node modules in a freshly cloned git repo (featuring automatic deployment to openshift) under node 0.12. Although install of npm packages works fine under v0.10, I get the following error when running npm install --production in my project directory when using node 0.12:

Unhandled rejection Error: Cannot find module '<MY-PROJECT-DIRECTORY>/node_modules/ghost/node_modules/sqlite3/lib/binding/node-v14-linux-x64/node_sqlite3.node' at Function.Module._resolveFilename (module.js:336:15) at Function.Module._load (module.js:278:25) at Module.require (module.js:365:17) at require (module.js:384:17) at Object.<anonymous> (<MY-PROJECT-DIRECTORY>/node_modules/ghost/node_modules/sqlite3/lib/sqlite3.js:4:15) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (module.js:384:17) at Client_SQLite3.initDriver (<MY-PROJECT-DIRECTORY>/node_modules/ghost/node_modules/knex/lib/dialects/sqlite3/index.js:41:24) at new Client_SQLite3 (<MY-PROJECT-DIRECTORY>/node_modules/ghost/node_modules/knex/lib/dialects/sqlite3/index.js:15:10) at Knex.initialize (<MY-PROJECT-DIRECTORY>/node_modules/ghost/node_modules/knex/knex.js:109:15) at Knex (<MY-PROJECT-DIRECTORY>/node_modules/ghost/node_modules/knex/knex.js:13:26) at ConfigManager.set (<MY-PROJECT-DIRECTORY>/node_modules/ghost/core/server/config/index.js:153:24) at ConfigManager.init (<MY-PROJECT-DIRECTORY>/node_modules/ghost/core/server/config/index.js:76:10) at <MY-PROJECT-DIRECTORY>/node_modules/ghost/core/server/config/index.js:267:30 at tryCatcher (<MY-PROJECT-DIRECTORY>/node_modules/ghost/node_modules/bluebird/js/main/util.js:24:31) at Promise._settlePromiseFromHandler (<MY-PROJECT-DIRECTORY>/node_modules/ghost/node_modules/bluebird/js/main/promise.js:454:31) at Promise._settlePromiseAt (<MY-PROJECT-DIRECTORY>/node_modules/ghost/node_modules/bluebird/js/main/promise.js:530:18) at Promise._settlePromises (<MY-PROJECT-DIRECTORY>/node_modules/ghost/node_modules/bluebird/js/main/promise.js:646:14)

Is this issue solely node version related?

ErisDS commented 8 years ago

Hi there @jessica-jordan, we have a troubleshooting guide with sections for both npm install issues and specifically sqlite3 issues.

The output you've pasted doesn't show the actual error, I recommend working through the troubleshooting steps and if you can't get it working, as it says there put the full output from npm install sqlite3 --loglevel=info into a gist and post it in the #help channel on slack.

jayjayjpg commented 8 years ago

Thanks for the quick feedback @ErisDS I'll troubleshoot that then!