-
Notifications
You must be signed in to change notification settings - Fork 12k
bug(moment-adapter): "_rollupMoment__default is not defined" #17320
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
Comments
I'm also using the moment-adapter so most probably the cause is the same. |
Edit: Noted wrong package :/ Can recreate with "Resolved" with |
Same here, @jnfaerch suggestion worked. |
Same issue: |
facing the same issue |
@wasiddiqui, ~0.907.0 worked for me. |
MY ISSUE RESOLVED by workaround
import * as _moment from 'moment';
|
Issue is not resolved, this is a workaround. We should'nt have to downgrade or change moment import. |
I spent some time investigating it and it's most-likely an issue with var Jg = n("wd/R");
const Zg = _rollupMoment__default || Jg Compared to the ones from a working version: Ng = n("wd/R"),
Vg = n.n(Ng).a || Ng I'm transferring the issue over to the correct repo. |
Same problem here in production build only with "@angular-devkit/build-angular": "~0.901.0". Downgraded for now. |
Have the same problem but with |
Same problem here after an update from Angular 9.0.5 to the latest |
Yep, also seeing this issue with moment after upgrading |
Same |
any news? |
Same problem |
Same problem with the production build. |
Any good news? |
We're seeing the same problem on an Angular 8 to Angular 9 upgrade we did on March 26. Details:
|
I just don't understand how to apply @mgechev fix or I don't understand why this issue is closed. |
@JosepAlacid the issue is fixed by this PR #17364. We'll release the fix on Wednesday. |
I will go on until then with the "window['_rollupMoment__default'] = null;" workaround. |
@danielehrhardt Is that with @mgechev 's fix or? |
Yes |
The fix is not our yet. @danielehrhardt did you build the CLI from source? |
Downgrading the devkit has problems if you run
So we've switched to the solution of adding |
Still not working. Just updated my deps to the latest ones and still same error. |
I think this is because angular-cli has not been released yet, still in v9.1.0. |
I tried the new version 9.1.1, that has been released today, and it solved the issue for me. |
As @OckePocke mentioned, we released CLI 9.1.1 today. If the problem still persist for you, feel free to open a new issue linking this one. |
The 9.1.1 CLI release seems to have fixed the same issue I got. |
No more |
And don't forget to add |
@JosepAlacid indeed 😉 |
This fix made my "ng test" configuration use Typescript 3.6, meaning that any files using the safe navigation (Elvis) operator don't compile correctly. Is there something special I need to do (angular.json edits, etc.) so that only build optimization is impacted? |
@hamfastgamgee optional chaining (safe navigation, elvis, etc.) is part of TypeScript 3.7. |
@mgechev Right, and Angular 9.1.x supports 3.8. But after this fix to use 3.6 in the build optimizer, "ng test" is running as 3.6 for me, meaning that code is not working if it uses 3.7 or 3.8 features. I'm trying to figure out if it's something wrong in my config that's causing "ng test" to use the wrong TS version, or if this effectively causes TS 3.7+ to be unsupported again and should have been documented more explicitly. |
Sad to see we're back to 3.6, was really liking optional chaining |
@JACrazy no need to go back to 3.6. We fixed this issue and published the fix on npm. |
Great to hear! |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
(related with angular/angular#36248)
Reproduction
https://github.com/kaito3desuyo/angular-test
Steps to reproduce:
ng build --prod
npm i -g http-server
dist/angular-test
Folderhttp-server
http://localhost:8080
This issue only occurs with production builds.
Expected Behavior
Screen is displayed correctly
Actual Behavior
Screen goes blank with console error
Environment
The text was updated successfully, but these errors were encountered: