{"action":"created","issue":{"url":"https://api.github.com/repos/tgriesser/knex/issues/1128","labels_url":"https://api.github.com/repos/tgriesser/knex/issues/1128/labels{/name}","comments_url":"https://api.github.com/repos/tgriesser/knex/issues/1128/comments","events_url":"https://api.github.com/repos/tgriesser/knex/issues/1128/events","html_url":"https://github.com/tgriesser/knex/issues/1128","id":125270245,"number":1128,"title":"\"Module not found\" errors when using knex with webpack","user":{"login":"shane-walker","id":910227,"avatar_url":"https://avatars.githubusercontent.com/u/910227?v=3","gravatar_id":"","url":"https://api.github.com/users/shane-walker","html_url":"https://github.com/shane-walker","followers_url":"https://api.github.com/users/shane-walker/followers","following_url":"https://api.github.com/users/shane-walker/following{/other_user}","gists_url":"https://api.github.com/users/shane-walker/gists{/gist_id}","starred_url":"https://api.github.com/users/shane-walker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shane-walker/subscriptions","organizations_url":"https://api.github.com/users/shane-walker/orgs","repos_url":"https://api.github.com/users/shane-walker/repos","events_url":"https://api.github.com/users/shane-walker/events{/privacy}","received_events_url":"https://api.github.com/users/shane-walker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-06T21:43:55Z","updated_at":"2016-01-21T22:11:18Z","closed_at":null,"body":"I am trying to use knex in a project I'm working on. The problem I'm having is that when I try to run webpack it is tracing the requires and attempting to pull in drivers/dialects that I'm not using and don't have installed.\r\n\r\nAny thoughts on how this can be solved?\r\n\r\n```log\r\nERROR in ./~/mariasql/lib/Client.js\r\nModule not found: Error: Cannot resolve 'file' or 'directory' ../build/Debug/sqlclient in ~/project/node_modules/mariasql/lib\r\n @ ./~/mariasql/lib/Client.js 17:10-45\r\n\r\nERROR in ./~/knex/lib/dialects/sqlite3/index.js\r\nModule not found: Error: Cannot resolve module 'sqlite3' in ~/project/node_modules/knex/lib/dialects/sqlite3\r\n @ ./~/knex/lib/dialects/sqlite3/index.js 33:11-29\r\n\r\nERROR in ./~/knex/lib/dialects/mysql2/index.js\r\nModule not found: Error: Cannot resolve module 'mysql2' in ~/project/node_modules/knex/lib/dialects/mysql2\r\n @ ./~/knex/lib/dialects/mysql2/index.js 33:11-28\r\n\r\nERROR in ./~/knex/lib/dialects/mysql/index.js\r\nModule not found: Error: Cannot resolve module 'mysql' in ~/project/node_modules/knex/lib/dialects/mysql\r\n @ ./~/knex/lib/dialects/mysql/index.js 35:11-27\r\n\r\nERROR in ./~/knex/lib/dialects/oracle/index.js\r\nModule not found: Error: Cannot resolve module 'oracle' in ~/project/node_modules/knex/lib/dialects/oracle\r\n @ ./~/knex/lib/dialects/oracle/index.js 40:11-28\r\n\r\nERROR in ./~/knex/lib/dialects/postgres/index.js\r\nModule not found: Error: Cannot resolve module 'pg' in ~/project/node_modules/knex/lib/dialects/postgres\r\n @ ./~/knex/lib/dialects/postgres/index.js 46:11-24\r\n\r\nERROR in ./~/knex/lib/dialects/postgres/index.js\r\nModule not found: Error: Cannot resolve module 'pg-query-stream' in ~/project/node_modules/knex/lib/dialects/postgres\r\n @ ./~/knex/lib/dialects/postgres/index.js 132:50-76\r\n\r\nERROR in ./~/knex/lib/dialects/strong-oracle/index.js\r\nModule not found: Error: Cannot resolve module 'strong-oracle' in ~/project/node_modules/knex/lib/dialects/strong-oracle\r\n @ ./~/knex/lib/dialects/strong-oracle/index.js 15:9-33```"},"comment":{"url":"https://api.github.com/repos/tgriesser/knex/issues/comments/173726972","html_url":"https://github.com/tgriesser/knex/issues/1128#issuecomment-173726972","issue_url":"https://api.github.com/repos/tgriesser/knex/issues/1128","id":173726972,"user":{"login":"shane-walker","id":910227,"avatar_url":"https://avatars.githubusercontent.com/u/910227?v=3","gravatar_id":"","url":"https://api.github.com/users/shane-walker","html_url":"https://github.com/shane-walker","followers_url":"https://api.github.com/users/shane-walker/followers","following_url":"https://api.github.com/users/shane-walker/following{/other_user}","gists_url":"https://api.github.com/users/shane-walker/gists{/gist_id}","starred_url":"https://api.github.com/users/shane-walker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shane-walker/subscriptions","organizations_url":"https://api.github.com/users/shane-walker/orgs","repos_url":"https://api.github.com/users/shane-walker/repos","events_url":"https://api.github.com/users/shane-walker/events{/privacy}","received_events_url":"https://api.github.com/users/shane-walker/received_events","type":"User","site_admin":false},"created_at":"2016-01-21T22:11:18Z","updated_at":"2016-01-21T22:11:18Z","body":"@joeketchi Ignoring the node_modules directory doesn't really solve the issue, we're just working around the issue. It would be awesome if the code would do these requires in a more intelligent way that doesn't throw errors."}}