-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Cannot find module 'cookie' #3060
Comments
Sorry, not sure I follow. How does |
The code which assumes it can dynamically import cookie is here: https://github.com/getsentry/sentry-javascript/blob/master/packages/utils/src/node.ts#L94. Cookie is a dependency of I am not entirely clear about how the magic that allows require to import different versions of packages work, but it seems like the setup you have here is not one of them for some reason.. |
Ah, shoot, The good news is, I'm pretty sure a refactor (for other reasons) which is in our backlog will fix this. The bad news is, I can't give you a specific timeline on when it's going to ship. I'll give it a look next week and see if it seems like it might be a relatively quick fix. |
There is no hurry from my side, I have fixed it by adding cookie to my top level dependencies for the time being and it appears to be working fine. |
Great, thanks. Will let you know once I do something. |
This error also occurs when using @sentry/serverless. You have to manually add cookies to the dependencies to resolve this issue. |
Related #2971 |
@P4sca1 @kbrownlees This should be fixed once #3210 is released. Please let me know if you're still running into trouble. |
|
Package + Version
@sentry/browser
@sentry/node
raven-js
raven-node
(raven for node)Version:
Description
I am getting errors because 'cookie' is failing to import. I have multiple dependencies which all depend on cookie and deployment is done via
npm ci
which means that 'cookie' does not end up at the top level ofnode_modules
. It only exists within@sentry/node
. EitherdynamicRequire
is failing to handle a non top level package, or it is failing to handle the fact the cookie dependencies is in@sentry/node
not@sentry/utils
.The text was updated successfully, but these errors were encountered: