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)

Most upvoted comments

Citation from nodejs.org blog for v6.0.0

The release notes below are annotated with the main breaking changes that warrant the jump to v6. Note that because this new version of Node.js is shipping with a new version of V8, you will need to recompile any native addons you have already installed or you will receive a runtime error when trying to load them. Use npm rebuild or simply remove your node_modules directory and npm install from scratch.

Does this help?

After firing this command : npm rebuild

No, It’s working fine.

Use npm rebuild

First, copy all outside (make a full backup) Then run:

  • git reset --hard — this will force your repository to last local commit
  • git clean -dfX — this will clean your repository including directories, like node_modules and 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 constructed
  • yarn cache clean — yeah, download all again after this…
  • yarn — install all packages again, it can respect your yarn.lock You 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 >= 5

Same 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'); TO const 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 sqlite3 and sqlite and 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?

        throw new Error('Please install sqlite3 package manually');
        ^

Error: Please install sqlite3 package manually
    at new ConnectionManager (/home/Kokoku Nashi/node_modules/sequelize/lib/dialects/sqlite/connection-manager.js:31:15)
    at new SqliteDialect (/home/Kokoku Nashi/node_modules/sequelize/lib/dialects/sqlite/index.js:14:30)
    at new Sequelize (/home/Kokoku Nashi/node_modules/sequelize/lib/sequelize.js:239:20)
    at Object.<anonymous> (/home/Kokoku Nashi/index.js:20:19)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:188:16)
    at bootstrap_node.js:609:3

@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:

@Nahasean94 https://github.com/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… 😈

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kriasoft/react-starter-kit/issues/587#issuecomment-293127529, or mute the thread https://github.com/notifications/unsubscribe-auth/AKNDAtcP6v-6_sqta_bVj_XMiLx8eecZks5rut3ogaJpZM4IJuK_ .

only worked after firing $ npm rebuild for me, also got this when trying to install on node v6 npm 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-0

all works now for me, but I am back to node v5.12.0