Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue while using it with Angular 4 #64

Closed
vrbagal opened this issue Jul 25, 2017 · 6 comments
Closed

Issue while using it with Angular 4 #64

vrbagal opened this issue Jul 25, 2017 · 6 comments
Labels
type: bug Something isn't working as intended or expected.

Comments

@vrbagal
Copy link

vrbagal commented Jul 25, 2017

I am trying to use Triology with this boilerplate , when I import trilogy in one of the TS file in src folder and run, it shows following error

image

@haltcase haltcase added the status: investigating Resolutions are being considered or researched. label Jul 25, 2017
@haltcase
Copy link
Owner

@vrbagal it's possible this is actually because of TypeScript but I'll have to look more into it.

@haltcase
Copy link
Owner

Also, if you have time it'd help a lot if you push up a repo I can pull down to test this out.

@vrbagal
Copy link
Author

vrbagal commented Jul 25, 2017

@citycide
repo :-> https://github.com/vrbagal/Angular-4-Electron-

@haltcase
Copy link
Owner

I pushed a fix in e1d57c3 that drops defining module.exports for the .mjs / module build.

Released in v1.2.1

@haltcase haltcase added type: bug Something isn't working as intended or expected. and removed status: investigating Resolutions are being considered or researched. labels Jul 25, 2017
@vrbagal
Copy link
Author

vrbagal commented Jul 26, 2017

Could you please add code snip to import and use it with typescript, I am not able to get it running with this repo

@haltcase
Copy link
Owner

Hmm. Original issue's fixed but it looks like there's a new one ( or two ). I've been trying to track them down but it's pretty easy to get tangled in webpack's webs...

using sql.js

__webpack_require__.i(...) is not a function

I'm not well versed in webpack's innards but this seems like a webpack issue. That API isn't working for some reason. I guess it could be the fact that node's path ( which is what's being replaced by webpack's require above ) isn't an ES module so importing while in an .mjs module could potentially be the issue? 🤷‍♂️

using sqlite3

This one I know more about than the above:

Cannot read property 'create' of undefined

... which I traced through knex into its usage of generic-pool. The problem is that we have this tree:

$ npm ls generic-pool
electron-angular-boilerplate@0.0.0 C:\......\Angular-4-Electron-
`-- trilogy@1.2.1
  +-- generic-pool@3.1.7
  `-- knex@0.13.0
    `-- generic-pool@2.5.4

generic-pool v3.0.0 ( which trilogy itself uses ) had a breaking change to its Pool constructor's signature. For whatever reason webpack is giving knex generic-pool@3.1.7 when it should be getting its own generic-pool@2.5.4 dependency. That seems pretty jacked to me. We'll probably have to open an upstream issue with webpack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working as intended or expected.
Projects
None yet
Development

No branches or pull requests

2 participants