-
Notifications
You must be signed in to change notification settings - Fork 995
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
ES6 IMPORT RESULTS UNDEFINED #1844
Comments
@salmansaleempiaic please provide code that I can copy and paste rather than a screen shot 👍 better still, could you provide a project I can clone on GitHub? yargs does support ESM, and my guess is you have something configured slightly wrong in the project. |
I think ran into the same issue today while running through a tutorial.
app.js:
running
If I dropped the |
It still has the same issue, can't use ES6 import syntax. File Content: Output: |
import yargs from 'yargs'
import { hideBin } from 'yargs/helpers'
yargs(hideBin(process.argv))
.command('curl <url>', 'fetch the contents of the URL', () => {}, (argv) => {
console.info(argv)
})
.demandCommand(1)
.parse() ☝️ if you're using pure ESM the format is as follows. |
The text was updated successfully, but these errors were encountered: