vCards-js
vCards-js copied to clipboard
Using in Angular (Typescript)
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'
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!
@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
You can use this package ngx-vcard.