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
Webpack - Critical dependency: the request of a dependency is an expression with 2.25.0 #5489
Comments
same issue |
same issue |
Same here, locking the package version to 2.24.0 helps for now... |
Same problem over here! Critical! |
I have had the same issue! Locked mine to 2.24.0 and fixed my build |
Seconded |
Same here. 2.25.0 gives this issue but not 2.24.0. Changes at 2092:16-2096:17 in moment.js is the root. |
Same issue, but strangely only when running as dev (this is a nuxt project) The issues seems to be in Changing: aliasedRequire(
(typeof __dirname !== undefined ? __dirname : '.') +
'/locale/' +
name
); to: aliasedRequire('../locale/' + name); Fixes the issue for me |
I get it both on dev and prod builds with my setup. |
Yeah, that's the obvious workaround, but not really a solution :-). |
I am also getting the same warning and getting following console errors, in a web browser for angular application while calling
|
same here |
Confirmed as well |
Wait a second -- this is warning, not an error. Does it still produce a bundle? |
With moment 2.25.0:
And it works. With moment@2.24.0:
And it still works. |
Yes, it does. Still - annoying, wrong and makes the build output full of crappy traces. |
I'm also seeing this, but only in production builds via our CI. |
@jontybrook I was seeing the same behavior but after nuking node_modules folder, I was able to reproduce this locally. |
The code with Fixed in 2.25.1 |
This has nothing to do with better console output...but rather less than ideally tested code breaking builds for MANY MANY people! |
Glad to hear its been fixed and published minutes ago though - spent the last many hours digging into on our end trying to find the cause |
Exactly ! Warning today is a potential error tomorrow. |
It was much worse than a warning...if you by chance were running moment-timezone which dynamically pulls in latest version of moment, this caused a full breaking of code! |
If only producing a bundle was the only desired result... |
Why the sarcasm ?! Clean output is important. In my setup I’ve put stats and metrics which are important for me and flooding it with unnecessary stuff makes it tiresome to read and slows my work at the very least. Then it comes the fact that a warning is always something that should not be ignored in the long term. Last, but actually first - it turns out to be really breaking for some setups as @agrohs reported. So ... sarcasm is not well placed here I beleive. Thanks for fixing it, though. |
Pin `moment` at `~2.24.0` in light of multiple issues with `2.25.0` ([5489](moment/moment#5489), [5472](moment/moment#5472)). The `resolutions` entry is necessary because `2.25` leaks in via transitive deps. Refs [STRIPES-678](https://issues.folio.org/browse/STRIPES-678)
Sarcasm aside, v2.25.1 doesn't actually fix anything (the |
This issue should not be closed...it is a breaking change for moment-timezone users who are using webpack, not just an issue of showing a warning (and affecting an enormously large number of people) |
Pin `moment` at `~2.24.0` in light of multiple issues with `2.25.0` ([5489](moment/moment#5489), [5472](moment/moment#5472)). Refs [STRIPES-678](https://issues.folio.org/browse/STRIPES-678)
Pin `moment` at `~2.24.0` in light of multiple issues with `2.25.0` ([5489](moment/moment#5489), [5472](moment/moment#5472)). The `resolutions` entry is necessary because `2.25` leaks in via transitive deps. Refs [STRIPES-678](https://issues.folio.org/browse/STRIPES-678)
Pin `moment` at `~2.24.0` in light of multiple issues with `2.25.0` ([5489](moment/moment#5489), [5472](moment/moment#5472)). Refs [STRIPES-678](https://issues.folio.org/browse/STRIPES-678)
Pin `moment` at `~2.24.0` in light of multiple issues with `2.25.0` ([5489](moment/moment#5489), [5472](moment/moment#5472)). Refs [STRIPES-678](https://issues.folio.org/browse/STRIPES-678)
Pin `moment` at `~2.24.0` in light of multiple issues with `2.25.0` ([5489](moment/moment#5489), [5472](moment/moment#5472)). Refs [STRIPES-678](https://issues.folio.org/browse/STRIPES-678)
Pin `moment` at `~2.24.0` in light of multiple issues with `2.25.0` ([5489](moment/moment#5489), [5472](moment/moment#5472)). Refs [STRIPES-678](https://issues.folio.org/browse/STRIPES-678)
Pin `moment` at `~2.24.0` in light of multiple issues with `2.25.0` ([5489](moment/moment#5489), [5472](moment/moment#5472)). The `resolutions` entry is necessary because `2.25` leaks in via transitive deps. I don't know why it is necessary here when it isn't, say, in ui-circulation, which pulls it in via the same route of stripes-cli and stripes-core. That makes no sense. Alas. Refs [STRIPES-678](https://issues.folio.org/browse/STRIPES-678)
same problem I want you to revert to the original version. Operation check environment |
Guy this is not fixed! Can we not close defects until they are resolved especially when they break existing builds such as Webpack?! @ichernev please re-open this as it's not resolved! This is going to break many people who rely on MomentJS and use it with vanilla Webpack. |
Pin `moment` at `~2.24.0` in light of multiple issues with `2.25.0` ([5489](moment/moment#5489), [5472](moment/moment#5472)). The `resolutions` entry is necessary because `2.25` leaks in via transitive deps. Refs [STRIPES-678](https://issues.folio.org/browse/STRIPES-678)
Pin `moment` at `~2.24.0` in light of multiple issues with `2.25.0` ([5489](moment/moment#5489), [5472](moment/moment#5472)). The `resolutions` entry is necessary because `2.25` leaks in via transitive deps. Refs [STRIPES-678](https://issues.folio.org/browse/STRIPES-678)
Hi, BUMP!, this is breaking my build also, not fixed!. |
`moment` `v2.25` less than `v2.25.3` caused many webpack-related bugs ([5489](moment/moment#5489), [5472](moment/moment#5472)). Refs STRIPES-678
`moment` `v2.25` less than `v2.25.3` caused many webpack-related bugs ([5489](moment/moment#5489), [5472](moment/moment#5472)). Refs STRIPES-678
Pin `moment` at `~2.24.0` in light of multiple issues with `2.25.0` ([5489](moment/moment#5489), [5472](moment/moment#5472)). Refs [STRIPES-678](https://issues.folio.org/browse/STRIPES-678)
I just update moment with npm i moment and it solved it |
Thanks, this really helped me!!! |
This morning I upgraded moment from 2.24.0 to 2.25.0 and started getting this warning from my Webpack build :
Critical dependency: the request of a dependency is an expression
Versions I'm using :
gulp - 4.0.2
webpack - 4.43.0
babel - 7.9.6
No other updates occurred in between. Only moment.js got updated and the warning appeared.
The text was updated successfully, but these errors were encountered: