react-starter-kit: sequelize dependency error 'Please install sqlite3 package manually'
Got this error.
/Users/corto/mega/MyApp/node_modules/sequelize/lib/dialects/sqlite/connection-manager.js:24
throw new Error('Please install sqlite3 package manually');
^
Error: Please install sqlite3 package manually
at new ConnectionManager (/Users/corto/mega/MyApp/node_modules/sequelize/lib/dialects/sqlite/connection-manager.js:24:11)
at new SqliteDialect (/Users/corto/mega/MyApp/node_modules/sequelize/lib/dialects/sqlite/index.js:12:28)
at new Sequelize (/Users/corto/mega/MyApp/node_modules/sequelize/lib/sequelize.js:233:18)
at Object.<anonymous> (/Users/corto/mega/MyApp/build/webpack:/data/sequelize.js:13:19)
at __webpack_require__ (/Users/corto/mega/MyApp/build/webpack:/webpack/bootstrap 6d1086b2a4d5e521e79e:19:1)
at Object.module.exports.Object.defineProperty.value (/Users/corto/mega/MyApp/build/webpack:/data/models/index.js:10:1)
at __webpack_require__ (/Users/corto/mega/MyApp/build/webpack:/webpack/bootstrap 6d1086b2a4d5e521e79e:19:1)
at Object.<anonymous> (/Users/corto/mega/MyApp/build/webpack:/core/passport.js:18:1)
at __webpack_require__ (/Users/corto/mega/MyApp/build/webpack:/webpack/bootstrap 6d1086b2a4d5e521e79e:19:1)
at Object.<anonymous> (/Users/corto/mega/MyApp/build/webpack:/server.js:21:1)
at __webpack_require__ (/Users/corto/mega/MyApp/build/webpack:/webpack/bootstrap 6d1086b2a4d5e521e79e:19:1)
at /Users/corto/mega/MyApp/build/webpack:/webpack/bootstrap 6d1086b2a4d5e521e79e:39:1
at Object.<anonymous> (/Users/corto/mega/MyApp/build/webpack:/webpack/bootstrap 6d1086b2a4d5e521e79e:39:1)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
OSX 10.11 x64 No matter - node v4 or v5 still got this error
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 3
- Comments: 42 (1 by maintainers)
Citation from nodejs.org blog for v6.0.0
Does this help?
After firing this command : npm rebuild
No, It’s working fine.
Use
npm rebuildFirst, copy all outside (make a full backup) Then run:
git reset --hard— this will force your repository to last local commitgit clean -dfX— this will clean your repository including directories, likenode_modulesand all unstaged changes and other unknown files to git, so be carefull, backup…git clean -dfx— this will clean your repository… everything else… should do nothing after previous one, but be carefull, backup…rm ~/.babel.json— this is babel cache, it can be badly constructedyarn cache clean— yeah, download all again after this…yarn— install all packages again, it can respect youryarn.lockYou should be clean of all possible side effects@lostlime do you have this dependency installed locally?
This worked for me using electron-rebuild.
./node_modules/.bin/electron-rebuild -w sqlite3
I need help, I havebeen stuck looking at this issue. I am running on Electron, node 6. and i have tried all the rebuilds and none seem to work.
Use
node >= 5Same problem when use sequelize in electron render process.
App threw an error during load Error: Please install sqlite3 package manually at ConnectionManager._loadDialectModule (webpack:///./node_modules/sequelize/lib/dialects/abstract/connection-manager.js?:81:15) at new ConnectionManager (webpack:///./node_modules/sequelize/lib/dialects/sqlite/connection-manager.js?:22:21) at new SqliteDialect (webpack:///./node_modules/sequelize/lib/dialects/sqlite/index.js?:14:30) at new Sequelize (webpack:///./node_modules/sequelize/lib/sequelize.js?:324:20) at initSequelize (webpack:///./src/sqlite.js?:21:18) at eval (webpack:///./src/sqlite.js?:28:1)
Seems to be the problem of webpack. Sequelize load the dialect with “return require(moduleName);”. The moduleName here is a variable, but this is not working with webpack. See issue.
In node_modules/sequelize/lib/dialects/sqlite/connection-manager.js:
const sql = require(‘sqlite3’) //This is working console.log(sql) console.log(moduleName) // moduleName is ‘sqlite3’ const sql1 = require(moduleName) //This is not working. console.log(sql1)
We can use
__non_webpack_require__when require sequelize to workaround this problem. See issue.Change
const sequelize = require('sequelize');TOconst sequelize = __non_webpack_require__('sequelize');This can run in development environment. But there is another problem, the built out electron package will miss the sequelize module…
Looking around, none of the above worked for me. What did work was installing both
sqlite3andsqliteand switching to Node 5.12.0.@Nahasean94 Is this working for you? There is no real need for sqlite in react-starter-kit nor sequelize. I fact I hate these dependencies because they are suggesting wrong way of doing database binding… 😈
This may happen after changing your node version.
After changing node version you may have to rebuild some of your local and *global modules !
Thanks! worked now
Have the same issue, none of the above works for me, my OS is Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-36-generic x86_64)
Anyone able to help?
@hbgdPro Thanks . It worked but I have to install windows-build-tools. 👍
Yea this worked for me
On Apr 11, 2017 4:56 AM, “Pavel Lang” notifications@github.com wrote:
only worked after firing
$ npm rebuildfor me, also got this when trying to install on node v6npm ERR! peerinvalid The package react@0.14.7 does not satisfy its siblings' peerDependencies requirements! npm ERR! peerinvalid Peer graphiql@0.5.0 wants react@^0.14.0 npm ERR! peerinvalid Peer react-dom@0.14.7 wants react@^0.14.7 npm ERR! peerinvalid Peer react-addons-test-utils@0.14.8 wants react@^0.14.8 npm ERR! peerinvalid Peer redbox-react@1.3.2 wants react@^0.14.0 || ^15.0.0 npm ERR! peerinvalid Peer enzyme@2.4.1 wants react@0.13.x || 0.14.x || ^15.0.0-0all works now for me, but I am back to node v5.12.0