I am bundling this library into a single JS. The driver is not resolved at runtime.
Notice in the log the path ./drivers/mysql//adapters/pool.js
Here is the error.
Error: Couldn't load the "pool" Adapter library for mysql ({"host":"***","user":***","password":"***","database":"***"}): Error: Cannot find module './drivers/mysql//adapters/pool.js'
at module.exports.get_adapter (/Users/steven/dev/projects/other/quickchords-server/src/main/resources/dist/main.js:7:15912)
at new module.exports (/Users/steven/dev/projects/other/quickchords-server/src/main/resources/dist/main.js:7:13859)
at Object.<anonymous> (/Users/steven/dev/projects/other/quickchords-server/src/main/resources/dist/main.js:1:4427)
at __webpack_require__ (/Users/steven/dev/projects/other/quickchords-server/src/main/resources/dist/main.js:1:309)
at Object.<anonymous> (/Users/steven/dev/projects/other/quickchords-server/src/main/resources/dist/main.js:164:370558)
at __webpack_require__ (/Users/steven/dev/projects/other/quickchords-server/src/main/resources/dist/main.js:1:309)
at /Users/steven/dev/projects/other/quickchords-server/src/main/resources/dist/main.js:1:1601
at Object.<anonymous> (/Users/steven/dev/projects/other/quickchords-server/src/main/resources/dist/main.js:1:1648)
at Module._compile (module.js:641:30)
at Object.Module._extensions..js (module.js:652:10)
Here's the call.
case 'pool':
const Pool = require(`${this.driver_info.path}/adapters/pool.js`)
return new Pool(settings);
suggestions
Remove the trailing slash from the driver descriptions.
${removeTrailingSlash(this.driver_info.path)}/...
Also, the error dumped displays my connection username and password. That's a bit concerning.
I am bundling this library into a single JS. The driver is not resolved at runtime. Notice in the log the path ./drivers/mysql//adapters/pool.js
Here is the error.
Here's the call.
suggestions
Also, the error dumped displays my connection username and password. That's a bit concerning.