Closed kgathuru closed 3 years ago
Same issue here when attempting to run mysqljs in Ionic4.
It produces de the following error:
ERROR TypeError: Cannot read property 'prototype' of undefined at Object.inherits (inherits_browser.js:5) at Object../node_modules/mysql/lib/protocol/Protocol.js (Protocol.js:9) at __webpack_require__ (bootstrap:83) at Object../node_modules/mysql/lib/Connection.js (Connection.js:6) at __webpack_require__ (bootstrap:83) at loadClass (index.js:133) at createConnection (index.js:10) at Tab2Page.push../src/app/tab2/tab2.page.ts.Tab2Page.connectDatabase (tab2.page.ts:136) at Object.eval [as handleEvent] (Tab2Page.ngfactory.js:1855) at Object.handleEvent (core.js:23107)
Howdy folks! We've just published 4.0 which changes a number of things. Could you try again with this new version and let me know how it goes? I'm happy to help you debug from there.
Since it's been a couple years, I'm closing this issue for now but I can re-open it at your request :)
I've managed to get pouch and the other pouch plugins working in angular 6.1.8, but I have had to disable crypto pouch.
I wonder if the problem could related to the issue mentioned below - removed shims for global and process: https://github.com/angular/angular-cli/issues/9827#issuecomment-369578814
The solution that helped with the other pouch libraries and plugins was to add the following to polyfills: