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",
}
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 directorywas thrown. Upon further investigation, I determined that the cause of the error was due to the usage ofCRLFline endings in theprotoc/bin/protocfile. 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 useyarn?For anyone struggling with the same issue - add this lines to
package.json: