yeppha / node-protoc Goto Github PK
View Code? Open in Web Editor NEWA simple wrapper for the protoc.
A simple wrapper for the protoc.
Thanks for the great lib! I have been using it for a long time, but I must switch to a more recent version of protoc
.
In the postinstall script a protoc binary is downloaded from a URL using node-fetch:
node-protoc/scripts/postinstall.js
Line 30 in d1e3575
But, neither HTTP_PROXY nor HTTPS_PROXY are being taken into account. This causes the download to hang in environments with a restricted firewall (e.g. some companies).
Would it be possible to account for http proxies?
We could use node-http-proxy-agent if the HTTP_PROXY or the HTTPS_PROXY environment variable is defined: https://stackoverflow.com/questions/60162485/how-to-configure-node-fetch-to-use-the-company-proxy
I am getting following error when running yarn install
on node v16.16.0
.
Error: Unsupported platform: darwin_x86_32. Was not able to find a proper protoc version.
Now the binary protoc will be deleted and get reinstalled every time when I ran yarn add somepackage
from here. It's very annoyed and time wasting when the netowk is blocked. Could we do some improvement at this issue?
Currently when i install the package npm install protoc --save-dev
I got error : Unsupported platform: darwin_x86_32. Was not able to find a proper protoc version.
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",
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.