Giter Club home page Giter Club logo

Comments (9)

Pavelyev avatar Pavelyev commented on August 20, 2024 1

Version 0.4.0 works properly with angular2-template-loader and having in resolve.extensions .ts before .js. Thank you guys. I think that shipping package with .ts file is right way.

from ngx-bootstrap-multiselect.

iacii avatar iacii commented on August 20, 2024

I'm getting this error too, though I'm not using Bootstrap 4. In node_modules/angular-2-dropdown-multiselect/src, I noticed the following files:

  • multiselect-dropdown.html
  • multiselect-dropdown.ts
  • multiselect-dropdown.js
  • multiselect-dropdown.js.map

I don't think the .js files should be there. I'm little confused about how they're getting downloaded there, because I don't see them in the GitHub repo. Deleting those two files fixes the problem for me, but that's a less than ideal solution.

from ngx-bootstrap-multiselect.

softsimon avatar softsimon commented on August 20, 2024

The .js .js.map are there because they are published on NPM to fix #19, but that might have been a bad decision? I am using angular-cli and I am not getting this error as of now.

from ngx-bootstrap-multiselect.

iacii avatar iacii commented on August 20, 2024

I'm no expert on these things, but I've noticed in many other libraries they have an index.js at the root along with a typescript definition file (index.d.ts). Then those files would reference files in a dist folder. For example: https://github.com/gevgeny/angular2-highcharts. Maybe something like that would work?

With that said, I did find another way to get it to work without deleting the js files. I simply changed my webpack config file to prioritize ts files first:

resolve: { extensions: ['', '.ts', '.js'] }

instead of:

resolve: { extensions: ['', '.js', '.ts'] }

from ngx-bootstrap-multiselect.

ashokac avatar ashokac commented on August 20, 2024

@iacii , Thanks for your response, But it didn't help me. I get the following error when I change the order in webpack.config.js.

ERROR in ./~/angular-2-dropdown-multiselect/src/multiselect-dropdown.ts
Module build failed: Error: Typescript emitted no output for /Users/chaas003/PTT/src/main/webapp/node_modules/angular-2-dropdown-multiselect/src/multiselect-dropdown.ts
at Object.loader (/Users/chaas003/PTT/src/main/webapp/node_modules/ts-loader/index.js:456:15)
@ ./src/module/app.module.ts 19:29-95

from ngx-bootstrap-multiselect.

iacii avatar iacii commented on August 20, 2024

This may explain why you're getting that error if you're using ts-loader to transpile your typescript: TypeStrong/ts-loader#278.

I'm using awesome-typescript-loader with no problems, so you may want to consider switching to that.

from ngx-bootstrap-multiselect.

nicholasguyett avatar nicholasguyett commented on August 20, 2024

I've updated the exported module to use commonjs instead of systemjs. If you're using webpack, this should resolve your issue. Please try the latest release and let us know if this resolves your problem.

from ngx-bootstrap-multiselect.

nicholasguyett avatar nicholasguyett commented on August 20, 2024

No response in 7 days. Assuming the fix worked and closing issue.

from ngx-bootstrap-multiselect.

saggy2012 avatar saggy2012 commented on August 20, 2024

HI, I am getting below error.
Error loading angular-2-dropdown-multiselect/src/multiselect-dropdown
can somebody plz help on this.
using systemjs.config.js file .

from ngx-bootstrap-multiselect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.