@cameronhunter/berry-bin-bug

0.0.0 • Public • Published

Yarn Berry bin bug

When a project defines a bin field to create a binary, yarn 2.0 seems to expect the file to be authored in JS rather than executing it using its shebang.

Yarn 2.0.0-rc.28 is bundled in this example repo showing the issue.

$ yarn --version
2.0.0-rc.28

How to reproduce

$ yarn install
$ yarn berry-bin-bug
/Users/chunter/workspace/github/cameronhunter/berry-bin-bug/bin/berry-bin-bug:3
echo "Hello world!"
     ^^^^^^^^^^^^^^

SyntaxError: Unexpected string
    at Module._compile (internal/modules/cjs/loader.js:895:18)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.module_1.Module._load (/Users/chunter/workspace/github/cameronhunter/berry-bin-bug/.pnp.js:13519:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11

Readme

Keywords

none

Package Sidebar

Install

npm i @cameronhunter/berry-bin-bug

Weekly Downloads

1

Version

0.0.0

License

MIT

Unpacked Size

1.22 kB

Total Files

3

Last publish

Collaborators

  • cameronhunter