mattlewis92/angular-bootstrap-calendar

Module not found: Can't resolve 'interact'

debasreedash opened this issue · 4 comments

Bug description / Feature request:

I am trying to move to webpack and have required angular-bootsrap-calendar. However, when I run webpack-dev-server, I am getting the following error:

ERROR in ./node_modules/angular-bootstrap-calendar/dist/js/angular-bootstrap-calendar-tpls.js
Module not found: Error: Can't resolve 'interact' in '...\angular-bootstrap-calendar\dist\js'.

I tried to add the alias as suggested in this post,
#445

resolve: {
alias: {
'interact.js': 'interact'
}
},

but it doesn't work for me. Any ideas?

Versions

Angular: 1.4.11

Calendar library: 0.29.3

Browser name and version: Chrome latest

Have you tried to install interactjs explicitly?

Yep. Installed it in my dependencies. The calendar used to work previously with bower, but I switched to installing the calendar via npm and it doesn't work with npm.

i finally figured it out. I had to add both alias as such
resolve: { alias: { 'interact.js': 'interactjs', 'interact': 'interactjs' } },

That's odd, I use this lib with webpack as well and it worked with no modifications to the webpack config for me. Oh well, glad you got it sorted 😄