question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: Failed to emit file into cwd since v3

See original GitHub issue

Self-service

  • I’d be willing to implement a fix

Describe the bug

@babel/cli can’t emit to the current working directory is not working since v3

To reproduce

const {promises: {writeFile}} = require(`fs`);

await writeFile(`input.js`, '', 'utf-8');

await packageJsonAndInstall({
  scripts: {
    build: `babel input.js -d .`,
  },
  devDependencies: {
    [`@babel/core`]: `^7.15.0`,
    [`@babel/cli`]: `^7.14.8`,
  },
});

await expect(yarn(`build`)).rejects.toThrow(`Command failed`);

Environment

System: OS: Linux 5.4 Ubuntu 20.04.3 LTS (Focal Fossa) CPU: (6) x64 Intel® Core™ i5-9600K CPU @ 3.70GHz Binaries: Node: 14.17.0 - /tmp/xfs-f9a896e2/node Yarn: 3.0.1 - /tmp/xfs-f9a896e2/yarn npm: 6.14.13 - ~/.asdf/installs/nodejs/lts/bin/npm

Additional context

No response

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
merceyzcommented, Sep 2, 2021

Should have been fixed in https://github.com/yarnpkg/berry/pull/3242 / 3.0.1-rc.2

yarn set version canary
0reactions
cometkimcommented, Sep 2, 2021

in my actual environment:

❯ yarn build
Error: ENOENT: no such file or directory, mkdir
    at Object.mkdirSync (fs.js:1009:3)
    at NodeFS.mkdirSync (/home/cometkim/Workspace/src/github.com/cometkim/gatsby-theme-stitches/.pnp.cjs:23591:24)
    at makeCallSync.subPath.subPath (/home/cometkim/Workspace/src/github.com/cometkim/gatsby-theme-stitches/.pnp.cjs:26495:26)
    at ZipOpenFS.makeCallSync (/home/cometkim/Workspace/src/github.com/cometkim/gatsby-theme-stitches/.pnp.cjs:26707:26)
    at ZipOpenFS.mkdirSync (/home/cometkim/Workspace/src/github.com/cometkim/gatsby-theme-stitches/.pnp.cjs:26494:17)
    at VirtualFS.mkdirSync (/home/cometkim/Workspace/src/github.com/cometkim/gatsby-theme-stitches/.pnp.cjs:23902:24)
    at PosixFS.mkdirSync (/home/cometkim/Workspace/src/github.com/cometkim/gatsby-theme-stitches/.pnp.cjs:23902:24)
    at URLFS.mkdirSync (/home/cometkim/Workspace/src/github.com/cometkim/gatsby-theme-stitches/.pnp.cjs:23902:24)
    at /home/cometkim/Workspace/src/github.com/cometkim/gatsby-theme-stitches/.yarn/__virtual__/@babel-cli-virtual-1936e3d081/0/cache/@babel-cli-npm-7.14.8-be23b58e8d-eb608f6ac5.zip/node_modules/@babel/cli/lib/babel/dir.js:197:183
    at Generator.next (<anonymous>) {
  errno: -2,
  syscall: 'mkdir',
  code: 'ENOENT'
}

:\

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - Emit skipped when parsing config typescript files
TypeScript files outside of the project folder will produce an Emit skipped error. I can't tell if this is your issue because '....
Read more >
Environmental Impact Statement on Rules to Eradicate ...
The intent of this rule proposal is to authorize control efforts that would eliminate CWD where it exists in the state and protect...
Read more >
Changelog - Cypress Documentation
Fixed an issue with Angular Component Testing where urls within SASS/SCSS files were not being correctly resolved which could result in incomplete styling....
Read more >
Changelog — Supervisor 4.2.4 documentation - Supervisord
Fixed a bug on Python 3 where a network error could cause supervisord to crash with ... error message is now emitted if...
Read more >
What's New In Python 3.8 — Python 3.11.1 documentation
Since the parameters to the left of / are not exposed as possible keywords, ... Python now uses the same ABI whether it's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found