kevinoleary19 / Angular-2-Datepicker

A minimalist datepicker inspired by Google's material design
70 stars 71 forks source link

Unable to compile with Browserify #35

Open NathofGod opened 7 years ago

NathofGod commented 7 years ago

I'm having issues compiling with my Browserify module. I haven't yet investigated module changes however this is the error.

..../angular2-material-datepicker/index.ts:1 export * from './src/datepicker.module'; ^ ParseError: 'import' and 'export' may appear only with 'sourceType: module'

NathofGod commented 7 years ago

Now understood to be that the library ships only TS file.

kevinoleary19 commented 7 years ago

Hey @NathofGod . Did you clone the repo, or install it through npm? When I publish it through npm, I incude the .js, js.map, and .ts files files together. Not sure why that would cause issues. However, if you cloned the repo locally you're going to have run tsc within the directory to get the .js files. Let me know if that is not the issue

NathofGod commented 7 years ago

Hey @koleary94 that's strange. I installed through npm and I got the following. Basically looks like just the source files.

image

kevinoleary19 commented 7 years ago

@NathofGod Are you pinned to a specific version? Very possible I messed up the npm deploy in earlier versions 😬 . I just installed without pinning to a version and I was able to see all of the js files. If not maybe your editor is hiding those files?

kevinoleary19 commented 7 years ago

@NathofGod lmk if you still need any help