EEXIST: file already exists, mkdir 'dist/app' and ENOENT: no such file or directory, mkdir 'dist/app/controllers/privilige' #12650
Labels
i: bug
i: regression
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
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
The text was updated successfully, but these errors were encountered: