-
Notifications
You must be signed in to change notification settings - Fork 311
bundle failed with moment.js #28
Comments
How can someone understand from this description, hi man open source give a little take some :) make an effort. Anyway, I ran into you'r issue so I don't need much: This semi-workaround will make it work on dev builds:
This will not work on production build, The core issue is with rollup build handling CommonJS modules. When doing:
You satisfy typescript (and you write the correct import statement) but in the bundling process rollup will mis handle this package and make This is why you get the error. In the "semi-workaround" you actually import using a statement rollup would expect so everything is fine (remember TS will output ES6 to rollup) Now you can run in dev but you will see a TS error since you import incorrectly. |
Hi @iron9light 😄 , This is a duplicate as @shlomiassaf noted. We are aware of the issue. We will fix it. @shlomiassaf - no need to be rude to @iron9light. Please follow our code of conduct. I'm going to close this issue and work off of the original. Thanks, |
@danbucholtz Thank you and this friendly community. |
Got this error message:
bundle prod failed: Error: Cannot call a namespace ('moment')
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @ionic/[email protected]
+-- @ngrx/[email protected]
+-- @ngrx/[email protected]
+-- @ngrx/[email protected]
+-- @types/[email protected]
+-- @types/[email protected]
+-- [email protected]
+-- [email protected] invalid
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]
The text was updated successfully, but these errors were encountered: