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

UnhandledPromiseRejectionWarning: Error: Invalid name: "redux-saga/effects" #32

Closed
aulisius opened this issue Oct 23, 2017 · 12 comments · Fixed by #33
Closed

UnhandledPromiseRejectionWarning: Error: Invalid name: "redux-saga/effects" #32

aulisius opened this issue Oct 23, 2017 · 12 comments · Fixed by #33

Comments

@aulisius
Copy link
Collaborator

aulisius commented Oct 23, 2017

Getting this error, when trying to include this plugin into my webpack config.

@aulisius
Copy link
Collaborator Author

Fixed this currently by using the only option passed to the plugin, but should the plugin break when it can't resolve a package?

@mastilver
Copy link
Owner

should the plugin break when it can't resolve a package?

No, it shouldn't... it should just ignore it... :/

I will need to have a look at that later

@aulisius
Copy link
Collaborator Author

I believe adding a .catch block here should at least prevent the plugin from dying.

@mastilver
Copy link
Owner

mastilver commented Oct 23, 2017

Can you give me the full stack trace?

Did you install redux-saga?

@aulisius
Copy link
Collaborator Author

aulisius commented Oct 23, 2017

This is when I run without using the only option.

(node:13924) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Invalid name: "redux-saga/effects"
(node:13924) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, prom
ise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:13924) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): Error: Invalid name: "redux-saga/effects"
(node:13924) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): Error: Invalid name: "redux-saga/effects"
(node:13924) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 8): Error: Invalid name: "redux-saga/effects"
(node:13924) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 10): Error: Invalid name: "redux-saga/effects"
(node:13924) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 12): Error: Invalid name: "redux-saga/effects"
(node:13924) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 14): Error: Invalid name: "redux-saga/effects"
(node:13924) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 16): Error: Invalid name: "redux-saga/effects"
(node:13924) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 18): Error: Invalid name: "redux-saga/effects"
(node:13924) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 20): Error: Invalid name: "redux-saga/effects"
(node:13924) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 22): Error: Invalid name: "redux-saga/effects"
(node:13924) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 24): Error: Invalid name: "redux-saga/effects"
(node:13924) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 26): Error: Invalid name: "redux-saga/effects"
(node:13924) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 28): Error: Invalid name: "redux-saga/effects"
(node:13924) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 31): Error: Invalid name: "redux-saga/effects"
(node:13924) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 34): Error: Invalid name: "redux-saga/effects"
Node#moveTo was deprecated. Use Container#append.
(node:13924) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 36): Error: Invalid name: "redux-saga/effects"
(node:13924) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 39): Error: Invalid name: "redux-saga/effects"
(node:13924) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 41): Error: Invalid name: "redux-saga/effects"
(node:13924) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 43): Error: Invalid name: "redux-saga/effects"

And yes, I have installed redux-saga

@mastilver
Copy link
Owner

It reminds me of this issue: import-js/eslint-plugin-import#793

Is it working at all with redux-saga@0.14.4?

@aulisius
Copy link
Collaborator Author

I didn't get that error with redux-saga@0.14.4.

@mastilver
Copy link
Owner

mastilver commented Oct 23, 2017

That's it then! :)

Easier to write a test with that information! There is a good chance, it's due to an underlying dependency (I have no idea which one yet). Maybe https://github.com/sindresorhus/resolve-pkg or https://github.com/sindresorhus/read-pkg-up

@mastilver
Copy link
Owner

For reference: the issue is caused by this change in redux-saga: redux-saga/redux-saga#895

@mastilver
Copy link
Owner

mastilver commented Oct 23, 2017

I found where the error comes from: https://github.com/npm/normalize-package-data/blob/9948ecf3d97cffcaab8f914522a0f3953edac6e4/lib/fixer.js#L335

@mastilver
Copy link
Owner

fixed on v3.4.1

@aulisius
Copy link
Collaborator Author

Awesome. Thanks a lot 💯

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

Successfully merging a pull request may close this issue.

2 participants