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

use with angular/typescript #351

Open
kpayson opened this issue Feb 7, 2021 · 2 comments
Open

use with angular/typescript #351

kpayson opened this issue Feb 7, 2021 · 2 comments

Comments

@kpayson
Copy link

kpayson commented Feb 7, 2021

How can I use yargs in an angular environment? It looks like it has a dependency on fs that prevents it from being used client side. Is this this true?

npm i yargs parser

then in my file

import parser from 'yargs-parser';

const argv = parser('--foo=99 --bar=9987930', {
string: ['bar']
})

and I get this error

ERROR in ./node_modules/yargs-parser/build/lib/index.js
Module not found: Error: Can't resolve 'fs' in '/Users/kenneth.paysonlabshare.org/Documents/code/labshare/ng-auth/node_modules/yargs-parser/build/lib'
ERROR in ./node_modules/yargs-parser/build/lib/index.js
Module not found: Error: Can't resolve 'path' in '/Users/kenneth.paysonlabshare.org/Documents/code/labshare/ng-auth/node_modules/yargs-parser/build/lib'

@flyingFlowers
Copy link

the same question

@sTEVE7611
Copy link

sTEVE7611 commented Jan 18, 2022 via email

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

3 participants