vue-cli-plugin-electron-builder: These dependencies were not found

Describe the bug After installing knex and serving the app i got an error saying “These dependencies were not found”

To Reproduce

  • Create a new project
  • Install knex and mysql driver npm install --save knex mysql
  • Run npm run electron:serve

Expected behavior Electron app boot up and work normally

Screenshots gambar

Environment (please complete the following information):

Additional context

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 16 (6 by maintainers)

Most upvoted comments

That did the trick, thank you so much for that tip @nklayman . You’re a gentleman and a scholar.

@chen-xin Make sure to mark sqlite3 as an external:

// vue.config.js
module.exports = {
  pluginOptions: {
    electronBuilder: {
      externals: ['sqlite3'],
      // If you are using Yarn Workspaces, you may have multiple node_modules folders
      // List them all here so that VCP Electron Builder can find them
      nodeModulesPath: ['../../node_modules', './node_modules']
    }
  }
}