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

Command 'yarn dev -o' throws __dirname is not defined error #13730

Closed
sabasayer opened this issue Apr 14, 2022 · 2 comments
Closed

Command 'yarn dev -o' throws __dirname is not defined error #13730

sabasayer opened this issue Apr 14, 2022 · 2 comments
Assignees

Comments

@sabasayer
Copy link

sabasayer commented Apr 14, 2022

Environment

image

Reproduction

  1. Create a nuxt project with command npx nuxi init on a windows machine
  2. Run 'yarn' in the directory
  3. Run 'yarn dev -o'

Describe the bug

'yarn dev -o' throws error '__dirname is not defined in ES module scope' at windows.

image

Additional context

'yarn dev' works fine. Problem is with the -o flag

Logs

No response

@danielroe
Copy link
Member

This is a consequence of nuxt/framework#4336 (issue is open, which must be one of the few remaining sindresorhus libraries still written in CJS). Shall we revert @pi0?

@danielroe
Copy link
Member

This is now resolved.

@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants