Skip to content

Not working properly with yarn on linux #11

Description

@czemar

I encountered an issue while utilizing the package on a Linux system using yarn. The error message /usr/bin/env: 'node\r': No such file or directory was thrown. Upon further investigation, I determined that the cause of the error was due to the usage of CRLF line endings in the protoc/bin/protoc file. To resolve the issue, I was required to convert the line endings in the postinstall script. Any ideas to make this solution less hacky and still use yarn?

For anyone struggling with the same issue - add this lines to package.json:

"scripts": {
    "postinstall": "npx crlf --set=LF ./node_modules/protoc/bin/protoc"
},
"devDependencies": {
    "crlf": "^1.1.1",
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions