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

EEXIST: file already exists, mkdir 'dist/app' and ENOENT: no such file or directory, mkdir 'dist/app/controllers/privilige' #12650

Closed
beegalayuvraj opened this issue Jan 18, 2021 · 3 comments · Fixed by #12783
Assignees
Labels
i: bug i: regression outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@beegalayuvraj
Copy link

beegalayuvraj commented Jan 18, 2021

Hi,
i ran the below commands with @bable/cli(v7.12.0) and @babel/core(v7.12.0) installed in my project.
It throws ENOENT error on first run and EEXIST on second run. Global installation of packages did not help me either.

Finally , i have downgraded the babel to v7.7.5 and it's working fine. is latest babel not compatible with node 10.8.0 ?

First run of the command:

sudo npx babel app --out-dir dist/app --ignore node_modules --extensions '.js,.jsx,.ts,.tsx'
{ Error: ENOENT: no such file or directory, mkdir 'dist/app/controllers/privilige'
at mkdirSync (fs.js:729:3)
at outputFileSync (/root/projectnode_modules/@babel/cli/lib/babel/dir.js:68:100)
at /root/projectnode_modules/@babel/cli/lib/babel/dir.js:114:11
at Generator.next ()
at asyncGeneratorStep (/root/projectnode_modules/@babel/cli/lib/babel/dir.js:56:103)
at _next (/root/projectnode_modules/@babel/cli/lib/babel/dir.js:58:194)
errno: -2,
syscall: 'mkdir',
code: 'ENOENT',
path: 'dist/app/controllers/privilige' }

Second run of the command:

sudo npx babel app --out-dir dist/app --ignore node_modules --extensions '.js,.jsx,.ts,.tsx'
{ Error: EEXIST: file already exists, mkdir 'dist/app'
at mkdirSync (fs.js:729:3)
at /root/projectnode_modules/@babel/cli/lib/babel/dir.js:215:104
at Generator.next ()
at asyncGeneratorStep (/root/projectnode_modules/@babel/cli/lib/babel/dir.js:56:103)
at _next (/root/projectnode_modules/@babel/cli/lib/babel/dir.js:58:194)
at /root/projectnode_modules/@babel/cli/lib/babel/dir.js:58:364
at new Promise ()
at /root/projectnode_modules/@babel/cli/lib/babel/dir.js:58:97
at _ref (/root/projectnode_modules/@babel/cli/lib/babel/dir.js:267:15)
at _default (/root/projectnode_modules/@babel/cli/lib/babel/dir.js:76:15) errno: -17, syscall: 'mkdir', code: 'EEXIST', path: 'dist/app' }

Environment

System:
OS: Linux 5.1 Ubuntu 16.04.5 LTS (Xenial Xerus)
Binaries:
Node: 10.8.0 - /usr/bin/node
npm: 6.14.11
npmPackages:
@babel/cli: 7.12.10
@babel/core: 7.12.10

@babel-bot
Copy link
Collaborator

Hey @beegalayuvraj! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite."

@JLHwung
Copy link
Contributor

JLHwung commented Feb 9, 2021

This is a regression introduced in #12458.

@JLHwung JLHwung self-assigned this Feb 9, 2021
@JLHwung
Copy link
Contributor

JLHwung commented Feb 9, 2021

As a workaround, please upgrade your node version to latest Node.js 10.

@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label May 13, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: bug i: regression outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants