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

Using in Angular (Typescript) #48

Open
anuj9196 opened this issue Jan 29, 2020 · 3 comments
Open

Using in Angular (Typescript) #48

anuj9196 opened this issue Jan 29, 2020 · 3 comments

Comments

@anuj9196
Copy link

anuj9196 commented Jan 29, 2020

I'm trying to use the library in the Angular 8 application. For that I installed the package using npm and in the component file, I used

import * as vCardsJS from 'vcards-js';

myMethod() {
  const vCard = vCardsJS();
  ...
}

But this gives error message as

ERROR in ./node_modules/vcards-js/index.js
Module not found: Error: Can't resolve 'fs' in '/home/code/node_modules/vcards-js'
@enesser
Copy link
Owner

enesser commented Feb 18, 2020

fs the Node file system as this package was initially intended to be used server-side. On the browser, you won't have this package. There are some users who have branched this repo for use in the browser, however.

Let me know if you still need help with this.

Thanks!

@alexandrosk
Copy link

@enesser
Hello! Do you happen to know which Fork could that be I want also to use this on nextjs, it could be done just by not having the fs functions though pretty easiliy

@maxbauer
Copy link

You can use this package ngx-vcard.

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

No branches or pull requests

4 participants