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

Library version 1.7.1 crashes Aurelia CLI Bundler builds #131

Open
LukevanTricht opened this issue Mar 16, 2022 · 4 comments
Open

Library version 1.7.1 crashes Aurelia CLI Bundler builds #131

LukevanTricht opened this issue Mar 16, 2022 · 4 comments

Comments

@LukevanTricht
Copy link

LukevanTricht commented Mar 16, 2022

I'm submitting a bug report

  • Library Version:
    1.7.1

Please tell us about your environment:

  • Operating System:
    WSL (Ubuntu)

  • Node Version:
    v16.14.0

  • NPM Version:
    8.3.1

  • JSPM OR Webpack AND Version
    Aurelia-CLI v2.0.3

  • Browser:
    Chrome 99

  • Language:
    TypeScript 4.6.2

Current behavior:
After upgrading from 1.7.0 to 1.7.1, my build now crashes with the following error:

./node_modules/aurelia-store/dist/aurelia-store.d.ts(1,33): error TS2307: Cannot find module '@redux-devtools/extension' or its corresponding type declarations.
./node_modules/aurelia-store/dist/aurelia-store.d.ts(64,46): error TS2307: Cannot find module '@redux-devtools/extension' or its corresponding type declarations.

Expected/desired behavior:
Hopefully, a patch update like this shouldn't have killed the build process.
Replication Steps(Can provide a minimal project as a repo if you'd like):

  1. Create a new AU project, as a custom project with Typescript, the Aurelia CLI as a bundler, and yarn
  2. yarn add aurelia-store
  3. Import any aurelia-store object(I chose connectTo)
  4. yarn build
@zewa666
Copy link
Member

zewa666 commented Mar 16, 2022

meh, sry about that. It seems I've added the typings fir the extension as devDependency instead of prod.

meanwhile please npm i -d @redux-devtools/extension yourself to avoid that build issue

@zewa666
Copy link
Member

zewa666 commented Mar 16, 2022

@LukevanTricht v1.7.2 has been released and should address this issue. Please take a look and see whether it works for you

@LukevanTricht
Copy link
Author

LukevanTricht commented Mar 16, 2022

@zewa666 It looks like you're missing a dependency that @redux-devtools requires, I got this warning doing the upgrade:

warning "aurelia-store > @redux-devtools/extension@3.2.2" has unmet peer dependency "redux@^3.1.0 || ^4.0.0".

And my build failed with:

/node_modules/@redux-devtools/extension/lib/types/developmentOnly.d.ts(1,31): error TS2307: Cannot find module 'redux' or its corresponding type declarations.
/node_modules/@redux-devtools/extension/lib/types/index.d.ts(1,54): error TS2307: Cannot find module 'redux' or its corresponding type declarations.
/node_modules/@redux-devtools/extension/lib/types/logOnly.d.ts(1,31): error TS2307: Cannot find module 'redux' or its corresponding type declarations.
/node_modules/@redux-devtools/extension/lib/types/logOnlyInProduction.d.ts(1,31): error TS2307: Cannot find module 'redux' or its corresponding type declarations.

@zewa666
Copy link
Member

zewa666 commented Mar 16, 2022

that's super weird, as I've tested it out with a fresh new CLI project without any troubles. Although I must admit it was Webpack now that I think. Anyways, seems they're having the same type of issue I had of using a devDependency as prod :(

I'm definitely not interested in adding Redux as a dependency as that goes way too far just for the sake of typings. The offending line is here. I'm not sure whether a type-only import would perhaps remove the issue or whether this is something specific to the CLI bundler. @3cp any ideas?

EDIT:
meh ... it's a peerDependency ... grrmpf. I really would have liked to use the upstream for proper typings but under this light it really starts to make no sense. I guess I'll have to copy/paste the EnhancerOptions type to the aurelia-store repo itself in order to avoid this mammoth of dependency hell

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