Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use this library in a angular 5 project #7

Closed
dchirutac opened this issue Sep 28, 2018 · 4 comments
Closed

How to use this library in a angular 5 project #7

dchirutac opened this issue Sep 28, 2018 · 4 comments

Comments

@dchirutac
Copy link

dchirutac commented Sep 28, 2018

Hi @mciastek,
Trying to use your library in my angular 5+ project import sal from 'sal.js'; I get the next error :
(TS) Module "node_modules/sal.js/index" has no default export.

Thanks

@dchirutac dchirutac changed the title How to integrate this library in a angular 5 project How to use this library in a angular 5 project Sep 28, 2018
@mciastek
Copy link
Owner

Hi, thanks for submitting the issue. Can you provide more details about your environment and project configuration? Maybe there is something wrong with bundler setup?

I tried to reproduce this bug in Angular app and it looks like there is no issue. See an example here: https://stackblitz.com/edit/angular-61xbke

@dchirutac
Copy link
Author

Hi @mciastek ,
I've generated the angular project using VS2017 template with ASP.NET Core 2.1.

Angular version : 5.2.0
TypeScript version : 2.5.3

@mciastek
Copy link
Owner

mciastek commented Oct 2, 2018

Did you set "allowSyntheticDefaultImports": true? Did you try to import it as follows - import * as sal from 'sal.js'? Can you paste your tsconfig.json here?

@dchirutac
Copy link
Author

Hi @mciastek , import * as sal from 'sal.js' works for me thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants