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

Special requirements for 1.1.0? #717

Closed
chscott opened this issue Dec 11, 2019 · 6 comments
Closed

Special requirements for 1.1.0? #717

chscott opened this issue Dec 11, 2019 · 6 comments

Comments

@chscott
Copy link

chscott commented Dec 11, 2019

Versions

  • sequelize: 5.21.2
  • sequelize-typescript: 1.1.0
  • typescript: 3.7.3

I'm submitting a ...

[x ] bug report
[ ] feature request

(More of a question than a bug.)

Actual behavior:

I've inherited a project that uses sequelize-typescript bundled via webpack. The project breaks when I updated sequelize-typescript to from 1.0.0 to 1.1.0 (or from 1.0.0 to 1.1.0-beta.0). I don't see any errors other than the database activity that should happen on app start simply doesn't occur. In tracking it down, I can see that webpack is bundling far fewer references to sequelize-typescript when 1.1.0 or 1.1.0-beta.0 are installed than when 1.0.0 is installed.

I know that's not much to go on, so I've scoped the question to asking if there are any new requirements I might not be aware of when updating to 1.1.0. Specifically, it looks like de6f6ab was the last major change between 1.1.0 and 1.1.0-beta.0. Is anything special required as a result of that change?

Expected behavior:

Given that 1.1.0 was a minor release, I'd expect no breaking changes.

Steps to reproduce:

I don't have any readily reproducible steps, unfortunately.

Related code:

@RobinBuschmann
Copy link
Member

Hey @chscott , thanks for reporting. In order to be able to use the models on client side, the feature implemented with the commit you've mentioned, was developed. Since you've bundling your app for server side, this feature shouldn't apply 🤔 What target is set in you webpack config? (Here is a link to the PR including the discussion)

@chscott
Copy link
Author

chscott commented Dec 11, 2019

The target is electron-renderer. That's not something I was looking at, but a quick search of that and webpack turns up this issue. I haven't fully digested it yet, but I wonder if it's related.

@RobinBuschmann
Copy link
Member

The target is electron-renderer. That's not something I was looking at, but a quick search of that and webpack turns up this issue. I haven't fully digested it yet, but I wonder if it's related.

@Toxicable Can you have a look at this issue? Is there something we can do? Is there a workaround you can think of?

@chscott
Copy link
Author

chscott commented Dec 11, 2019

From the issue I linked, it may have nothing to do with sequelize-typescript at all and that the only reason 1.0.0 works for me is that it omitted the browser support, thus not giving webpack a chance to make the wrong decision. I'm on webpack 4.41.2, which I believe is impacted by that issue.

I'll try some of the workarounds from the webpack thread and update here for posterity.

@chscott
Copy link
Author

chscott commented Dec 11, 2019

The solution here worked for me. I'm not sure it's the most desired solution, but it's enough for me to believe this isn't an issue with sequelize-typescript.

Thanks for the help!

@chscott chscott closed this as completed Dec 11, 2019
@RobinBuschmann
Copy link
Member

You're welcome! Good to here you find a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants