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

Module '"redux-saga/effects"' has no exported member 'call'. #2389

Open
tsopeh opened this issue Sep 11, 2023 · 4 comments
Open

Module '"redux-saga/effects"' has no exported member 'call'. #2389

tsopeh opened this issue Sep 11, 2023 · 4 comments

Comments

@tsopeh
Copy link

tsopeh commented Sep 11, 2023

Steps to reproduce

Try importing the call (or any other) method in a .js or .ts file.

Description of the bug/issue

There is no code completion, suggestions or documentation in WebStorm and StackBlitz.

For .ts files IDE says: Module '"redux-saga/effects"' has no exported member 'call'.

Steps to reproduce the bug/issue

  1. Open this StackBlitz repro
  2. Take a look at the index.ts and index-js.js

Example

import { call } from 'redux-saga/effects';

Actual results

IDE: Module '"redux-saga/effects"' has no exported member 'call'.

The Expected results

Successfully resolved import.

Environment information

  • redux-saga version - 1.2.3
  • babel / typescript setup - TS 4.9.3

Note

I've tried to bring the attention to this issue in the following issues, but got no answers for two weeks:

@neurosnap
Copy link
Member

This must be an issue with StackBlitz because when I download the project locally and run it, there are no typescript issues. Could you please create a github repo that I could clone locally that replicates this issue?

@tsopeh
Copy link
Author

tsopeh commented Sep 13, 2023

It works well in VS Code (locally), but JS files in WebStorm (locally) do not recognise types for "redux-saga/effects". Many other libraries work fine.

Here's the exported StackBlitz project. You can export it as well by clicking to the "Download Project" button.

ZIP: typescript-ojxbva.zip

image

@neurosnap
Copy link
Member

neurosnap commented Sep 13, 2023

Running that project using vite works fine. Running the project using VS Code works fine. Is it possible this is an issue specifically with WebStorm/Stackblitz? Are there any other IDEs or bundlers that you notice the same typing issue?

I don't want to be dismissive and say this is a WebStorm/Stackblitz problem so I'm happy to guide anyone through this issue and accept any PRs that fix the problem. However, I don't personally have the bandwidth to debug an IDE specific issue with redux-saga.

Thanks for raising this issue and again, happy to help where I can on fixing this issue.

@simlmx
Copy link

simlmx commented Feb 5, 2024

I had the same issue using rollup and this typescript plugin: https://www.npmjs.com/package/rollup-plugin-typescript2

Using the official plugin instead fixed the issue:
https://www.npmjs.com/package/@rollup/plugin-typescript

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

3 participants