pwa-fundamentals icon indicating copy to clipboard operation
pwa-fundamentals copied to clipboard

Add sqlite3 installation to setup documentation

Open mike-north opened this issue 7 years ago • 5 comments

mike-north avatar Aug 18 '17 05:08 mike-north

Hi Mark, I have been struggling to get this codebase setup and seeing errors in setting up sqllite. Was there a separate setup required to get it installed ? Here is the stacktrace of error that I have been observing

Error: Failed to execute '/Users/shjain/.nvm/versions/node/v7.1.0/bin/node /Users/shjain/Development/pwa-fundamentals/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/shjain/Development/pwa-fundamentals/node_modules/sqlite3/lib/binding/node-v51-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/shjain/Development/pwa-fundamentals/node_modules/sqlite3/lib/binding/node-v51-darwin-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/shjain/Development/pwa-fundamentals/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:885:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Darwin 16.7.0
node-pre-gyp ERR! command "/Users/shjain/.nvm/versions/node/v7.1.0/bin/node" "/Users/shjain/Development/pwa-fundamentals/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"

sharadJay avatar Nov 25 '17 15:11 sharadJay

I would suggest using the current stable version of node (9.2 or 9.5 now?) and seeing if that helps

mike-north avatar Dec 05 '17 23:12 mike-north

No, I did not get any success with 8.9.0 or 9.2.0. Looks like there are a lot of folks who are having issues with sqlite 3 installation.

sharadJay avatar Dec 09 '17 04:12 sharadJay

@sharadJay - Please do the following

  1. Uninstall and reinstall the native sqlite library
brew uninstall --force --ignore-dependencies sqlite3 #remove the compiled native library
brew doctor # and fix ALL issues it points out
brew install sqlite3 # reinstall it
  1. Clear your nvm cache
nvm cache clear
  1. Remove your node_modules folder for the project, and reinstall all node dependencies
rm -rf node_modules
npm i

mike-north avatar Dec 09 '17 06:12 mike-north

I did above but had the same problem. I dug further and added sqlite3 to my path which resolved it. Thanks @mike-north for your help 😄

sharadJay avatar Dec 10 '17 03:12 sharadJay