michael-hack / bulma-calendar

Bulma's extension to display a calendar
MIT License
288 stars 165 forks source link

date-fns "Module parse failed, need an appropriate loader" #246

Closed futura closed 3 years ago

futura commented 4 years ago

Bug Report

Environment

Current Behavior Set of errors for each date-fns locale that look like this ...

11:46:36 webpacker.1 | WARNING in ./node_modules/bulma-calendar/node_modules/date-fns/locale/ar/index.d.ts 1:8
11:46:36 webpacker.1 | Module parse failed: Unexpected token (1:8)
11:46:36 webpacker.1 | You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
11:46:36 webpacker.1 | > declare module 'date-fns/locale/ar' { }

Input Code

import bulmaCalendar from "bulma-calendar/src/js/index";

./node_modules/bulma-calendar/node_modules/date-fns/locale/ar/index.d.ts is only one line ...

declare module 'date-fns/locale/ar' { }

Possible Solution

Typescript loading issue, but not sure if this is a bulma-calendar problem or something with my setup? I don't see any typescript dependencies in bulma-calendar. I'm able to install date-fns in my app as its own module with no errors.