https://github.com/cameronhunter/berry-bin-bug
Repository demonstrating a Yarn 2.0 issue
https://github.com/cameronhunter/berry-bin-bug
berry issue yarn
Last synced: about 1 month ago
JSON representation
Repository demonstrating a Yarn 2.0 issue
- Host: GitHub
- URL: https://github.com/cameronhunter/berry-bin-bug
- Owner: cameronhunter
- Created: 2020-02-02T20:30:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-02T21:16:39.000Z (over 6 years ago)
- Last Synced: 2025-02-24T13:32:10.366Z (over 1 year ago)
- Topics: berry, issue, yarn
- Language: JavaScript
- Size: 1.05 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Yarn Berry bin bug
See [issue on yarnpkg/berry](https://github.com/yarnpkg/berry/issues/882).
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.
```sh
$ yarn --version
2.0.0-rc.28
```
## How to reproduce
```sh
$ 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
```