tochoromero / aurelia-table

Simple functional data table for Aurelia
https://tochoromero.github.com/aurelia-table
MIT License
67 stars 25 forks source link

Unhandled rejection Error: Cannot find module './au-table'. #31

Closed stefan505 closed 6 years ago

stefan505 commented 7 years ago

I'm trying to use aurelia-table inside the ASP.NET Core SPA Templates project template. I followed the instructions on the aurelia-table docs for Webpack:

npm install au-table --save

Then inside my webpack.config.vendor.js file:

vendor: [
            ...
            'au-table'
        ],

Inside the boot.ts => configure(...):

    aurelia.use
        .standardConfiguration()
        .developmentLogging()
        .plugin('au-table');

During startup, I get the following error:

Unhandled rejection Error: Cannot find module './au-table'.
    at webpackContextResolve (http://localhost:52883/dist/app.js?v=zDdjozsbuRgOZRkI4iCXHAyJTLXuVjqH7rmzHFlXydM:319:9)
    at webpackContext (http://localhost:52883/dist/app.js?v=zDdjozsbuRgOZRkI4iCXHAyJTLXuVjqH7rmzHFlXydM:314:29)
    at http://localhost:52883/dist/app.js?v=zDdjozsbuRgOZRkI4iCXHAyJTLXuVjqH7rmzHFlXydM:1939:47
    at tryCatcher (http://localhost:52883/dist/vendor.js?v=v9GqwVx6JdS5h4Fcp0GWmRCQf4hN06km_igzxc-M6uo:20977:23)
    at Promise._settlePromiseFromHandler (http://localhost:52883/dist/vendor.js?v=v9GqwVx6JdS5h4Fcp0GWmRCQf4hN06km_igzxc-M6uo:18999:31)
    at Promise._settlePromise (http://localhost:52883/dist/vendor.js?v=v9GqwVx6JdS5h4Fcp0GWmRCQf4hN06km_igzxc-M6uo:19056:18)
    at Promise._settlePromise0 (http://localhost:52883/dist/vendor.js?v=v9GqwVx6JdS5h4Fcp0GWmRCQf4hN06km_igzxc-M6uo:19101:10)
    at Promise._settlePromises (http://localhost:52883/dist/vendor.js?v=v9GqwVx6JdS5h4Fcp0GWmRCQf4hN06km_igzxc-M6uo:19180:18)
    at Async._drainQueue (http://localhost:52883/dist/vendor.js?v=v9GqwVx6JdS5h4Fcp0GWmRCQf4hN06km_igzxc-M6uo:15909:16)
    at Async._drainQueues (http://localhost:52883/dist/vendor.js?v=v9GqwVx6JdS5h4Fcp0GWmRCQf4hN06km_igzxc-M6uo:15919:10)
    at Async.drainQueues (http://localhost:52883/dist/vendor.js?v=v9GqwVx6JdS5h4Fcp0GWmRCQf4hN06km_igzxc-M6uo:15793:14)
    at MutationObserver.<anonymous> (http://localhost:52883/dist/vendor.js?v=v9GqwVx6JdS5h4Fcp0GWmRCQf4hN06km_igzxc-M6uo:20231:17)

Am I doing something wrong?

tochoromero commented 7 years ago

I have never tried it with those templates, I will give a try as soon I have a chance

stefan505 commented 7 years ago

Ok thanks, just as an FYI, I am using another aurelia plugin, aurelia-validation inside the same project template, without any issues. I tried to compare the /dist/commonjs/index.js file with /dist/commonjs/aurelia-validation.js between the respective plugins, but I am not sure why the one would work and the other not.

stefan505 commented 7 years ago

I managed to resolve this issue, by adding <require from="au-table"></require> inside a template.

tochoromero commented 6 years ago

I'm about to release a new version with better support for webpack 2.0, hopefully this will get rid of this problem.