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

Browser version does not work (17.0.1) #1981

Open
caiiiycuk opened this issue Jul 7, 2021 · 4 comments · May be fixed by #2350
Open

Browser version does not work (17.0.1) #1981

caiiiycuk opened this issue Jul 7, 2021 · 4 comments · May be fixed by #2350
Labels

Comments

@caiiiycuk
Copy link

The browser version of yargs works fine for 16.0.0-alpha.3, but for latest available version on unpkg it not working.
This is easy to test, open jsfiddle from yargs docs.
And replace this:

import { Yargs } from 'https://unpkg.com/yargs@16.0.0-alpha.3/browser.mjs';

To this

import Yargs from 'https://unpkg.com/yargs@17.0.1/browser.mjs';

Then save and play with yargs, you will see a lot of errors, like this:

alert --help
---
Uncaught TypeError: __classPrivateFieldGet(...).Parser.looksLikeNumber is not a function
    parsePositionalNumbers https://unpkg.com/yargs@17.0.1/build/lib/yargs-factory.js:1045
    postProcess https://unpkg.com/yargs@17.0.1/build/lib/yargs-factory.js:1204
    runYargsParserAndExecuteCommands https://unpkg.com/yargs@17.0.1/build/lib/yargs-factory.js:1336
    parse https://unpkg.com/yargs@17.0.1/build/lib/yargs-factory.js:675
    <anonymous> https://fiddle.jshell.net/_display/?editor_console=true:143
    EventListener.handleEvent* https://fiddle.jshell.net/_display/?editor_console=true:141
yargs-factory.js:1045:62
alert
---
Uncaught TypeError: __classPrivateFieldGet(...).Parser.looksLikeNumber is not a function
    parsePositionalNumbers https://unpkg.com/yargs@17.0.1/build/lib/yargs-factory.js:1045
    postProcess https://unpkg.com/yargs@17.0.1/build/lib/yargs-factory.js:1204
    runYargsParserAndExecuteCommands https://unpkg.com/yargs@17.0.1/build/lib/yargs-factory.js:1420
    parse https://unpkg.com/yargs@17.0.1/build/lib/yargs-factory.js:675
    <anonymous> https://fiddle.jshell.net/_display/?editor_console=true:143
    EventListener.handleEvent* https://fiddle.jshell.net/_display/?editor_console=true:141
yargs-factory.js:1045:62
clear
---
Uncaught TypeError: __classPrivateFieldGet(...).Parser.looksLikeNumber is not a function
    parsePositionalNumbers https://unpkg.com/yargs@17.0.1/build/lib/yargs-factory.js:1045
    postProcess https://unpkg.com/yargs@17.0.1/build/lib/yargs-factory.js:1204
    runYargsParserAndExecuteCommands https://unpkg.com/yargs@17.0.1/build/lib/yargs-factory.js:1420
    parse https://unpkg.com/yargs@17.0.1/build/lib/yargs-factory.js:675
    <anonymous> https://fiddle.jshell.net/_display/?editor_console=true:143
    EventListener.handleEvent* https://fiddle.jshell.net/_display/?editor_console=true:141
yargs-factory.js:1045:62

Is browser part will be mantained in future, I want to use it but not sure is it ready for production.

@bcoe
Copy link
Member

bcoe commented Jul 10, 2021

@caiiiycuk I would like to support the browser use case, I think we should add an integration test.

@ghost
Copy link

ghost commented Oct 30, 2021

I cannot reproduce this on Firefox Browser 93.0 (64-bit)

@bcoe
Copy link
Member

bcoe commented Nov 8, 2021

@caiiiycuk are you still able to reproduce?

@caiiiycuk
Copy link
Author

@bcoe Yep

bug.mp4

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

Successfully merging a pull request may close this issue.

2 participants