mattlewis92 / angular-calendar

A flexible calendar component for angular 15.0+ that can display events on a month, week or day view.
https://mattlewis92.github.io/angular-calendar/
MIT License
2.72k stars 866 forks source link

Error extracting i18n tags with Angular 15+ #1671

Closed jaudette790 closed 1 year ago

jaudette790 commented 1 year ago

Describe the bug When running ng extract-i18 in project, i get the error:

/node_modules/angular-calendar/fesm2020/angular-calendar.mjs - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
Error: (...)/node_modules/angular-calendar/fesm2020/angular-calendar.mjs: 'column' must be greater than or equal to 0 (columns start

"extract-i18n" failed: undefined

Minimal reproduction of the problem with instructions Since this is not a browser issue, did not create a stackblitz. See this stackoverflow question with the same issue

Screenshots No screenshots

Versions

matts-bot[bot] commented 1 year ago

Thanks so much for opening an issue! If you'd like to support this project, then please consider sponsoring me

cmayankc commented 1 year ago

+1

geraldspreer commented 1 year ago

I can confirm this issue. Exactly like it was described by @jaudette790. I would be really cool @mattlewis92 if you would be able to fix this.

geraldspreer commented 1 year ago

The error is thrown by babel.js https://unpkg.com/@babel/standalone@7.21.2/babel.js.map

const COL_GTR_EQ_ZERO = 'columnmust be greater than or equal to 0 (columns start at column 0)';

DerZyklop commented 1 year ago

Have the same on Angular 15. @jaudette790 you could change 'Angular 16' to 'Angular 15+' in the title.

DerZyklop commented 1 year ago

And i confirm @geraldspreer. Error is

Error: /Users/nils/S/plano/scheduler.frontend.ng2/node_modules/angular-calendar/fesm2020/angular-calendar.mjs: `column` must be greater than or equal to 0
jaudette790 commented 1 year ago

Have the same on Angular 15. @jaudette790 you could change 'Angular 16' to 'Angular 15+' in the title.

I updated the title, but I did not get the error until I updated to Angular 16

mattlewis92 commented 1 year ago

Hey folks, I just took a quick look at this issue and this seems like a bug with angular rather than anything I'm able to fix my end. You can see there are other people running into the problem and that aren't using this package.

For example:

mattlewis92 commented 1 year ago

One temporary workaround that I found is to delete the sourcemap before extracting i18n:

rm node_modules/angular-calendar/fesm2020/angular-calendar.mjs.map
geraldspreer commented 1 year ago

Thank you @mattlewis92 for providing this info to temporary fix this problem.

mattlewis92 commented 1 year ago

I've filed an issue on the angular CLI repo with steps to reproduce, hopefully they can find a proper fix soon 🙏

https://github.com/angular/angular-cli/issues/25413

kukjevov commented 1 year ago

It is a problem of Babel which is already under resolution, but not closed yet https://github.com/babel/babel/issues/15712

kukjevov commented 1 year ago

@jaudette790 can you verify whether babel version 7.22.7 solves issue also for you?

https://github.com/angular/angular-cli/issues/25414#issuecomment-1623448186

mattlewis92 commented 1 year ago

Verified that the issue is fixed in angular CLI 16.1.4!