How do I get HttpProxyAgent to use NODE_EXTRA_CA_CERTS during vs code's yarn build? - node.js

Trying to build VS Code from source behind a corporate proxy. I've got everything to the point of the extensions (specifically native-watchdog) building, but when they go out to download the headers, they are failing due to being unable to validate the cert chain.
I'm driving myself up a wall here trying to figure out how to get the HttpProxyAgent to use the NODE_EXTRA_CA_CERTS env variable, and hoping someone here can point me in the right direction.
With --verbose enabled, I can clearly see the proxy being set up, and both ca: and certs: options are empty, but I can't figure out how to get those to use the env vars.
I can't modify the code to put them in manually, because the VS Code build process pulls down everything fresh every time. I'm currently working my way through figuring out the steps yarn takes to build everything (in the hopes of stopping the pulls, so I CAN patch the code locally and build code.exe), but yeah, turning to SO for help.
Thanks for any help y'all can provide!

Related

Trivial Node.js via Passenger on DreamHost - Permission Denied

I tried setting up a do-nothing Node app, and it failed.
I developed some Node.js code offline in containers. I now want to try deploying it on DreamHost. I am doing it incrementally, adding features one by one. Starting with “Hello World” and going from there.
I set up a new subdomain and enabled Passenger. I was able to serve up an index.html file. I followed https://help.dreamhost.com/hc/en-us/articles/360029083351-Installing-a-custom-version-of-NVM-and-Node-js and installed Node and nvm (using the versions recommended in that artcle). I then installed a few packages I plan to use (most notably Express, the rest won’t come into play until later).
With just a Hello World app, that failed. The error message is below. But, I checked all the relevant files and they all have global read and execute permissions. I’m wondering if it is something else. I tried multiple Hello World examples for app.js, copied directly from different tutorials, none of which worked (but they do work locally). My more complex code also does not work, but that is the next step.
What am I missing? I followed the directions exactly. What other landmines do I have to look forward to? I really don’t want to spend time wrestling with infrastructure, I want it to “just work”, ideally.
An error occurred while starting the web application. It exited before signalling successful startup back to Phusion Passenger. Please read this article for more information about this problem.
Raw process output:
*** ERROR ***: Cannot execute /home/<user name>/.nvm/versions/node/v12.16.3: Permission denied (13)
Unclear what solved the issue.
Ran through changing the permissions on the files, as would seem obvious. Changed '/home/<user name>/.nvm/versions/node/v12.16.3' to '/home/<user name>/.nvm/versions/node/v12.16.3/bin/node' in the .htaccess file. Neither of those seemed to solve it.
Repeated the process again later. Followed it by `touch <webapp directory>/tmp/restart.txt' and it started working. I had been editing files in the web app's directory, so it isn't clear what touching that file did.

Node server routes all timing out

No idea what happened... It was working and then it wasnt.
I am currently building a web app and decided to take some time off from the product side and build a landing page.
For some reason, I decided to build the landing page on a separate Github branch. So I checked out to a new branch, deleted everything, and started working on the landing page.
I soon realized this is a terrible idea and created a new repo to store my landing page.
I checked back into my master branch and spun my Node server up but for some reason now, everything is timing out. I opened Postman and tried hitting some of my endpoints but after like 3 minutes of loading, it tells me that it could not get any response and that there was an error connecting to localhost:3001/api/posts
In my terminal, all I see is this when I hit the route:
GET /api/posts - - ms - -
This has never happened to me before and I am completely clueless on WTH happened.
I tried deleting my local stuff and re-cloning the repo and installing my dependencies but to no avail...
Would love to know if someone has an idea on what's going on.
Check first is this isn't because of another process already listening on that port (but using resources which were deleted or not properly updated)
Closing applications or even rebooting can help you asserting if the issue is permanent or just linked to your current session.
The OP Syn points out in the comments the ~/.env file missing
.env files allow you to put your environment variables inside a file.
You just create a new file called .env in your project and slap your variables in there on different lines.
To read these values, there are a couple of options, but the easiest is to use the dotenv package from npm.
npm install dotenv --save
Note: it is generally not versioned, as it includes potentially sensitive date.

Setting up development environment for OpenBTS

I want to make some little changes in OpenBTS code and use it. Currently I am following this process
Make some changes in code. ( Can't do testing of these changes at runtime)
Build the packages
Install the packages
Setup or Run OpenBTS
Test the behavior of OpenBTS to see that those changes are reflected or not.
If not working, goto step 1
This a quite hectic process, is there any smarter way to do it. Like OpenBTS is directly run from code, rather than packages installed on Ubuntu. If I make change in code, and they are directly reflected in my setup. How i can setup this dev environment.
This answer is a bit late, I have just started to work on this my self. I don't bother installing the packages each time. My cycle is more like this:
Build the packages
Setup/run the database scripts (init the databases)
Install the packages that I don't need to re-build
Run each package manually (from the open BTS folders), e.g. run ../Transceiver, ../sipauthserver, ../OpenBTS, ../OpenBTSCLI ...etc...
Then when I want to make a code change - I do:
Stop everything
Code change
Re-build (e.g. just openBTS)
Re-run everything as before.
I also scripted the startup / stop sequences to make this faster (open/run each app in new terminals)

RFT testscripts not executing

I have just installed RFT version 8.3.0 for testing a mainframe application. I imported the appropriate rftjdtr files to the project. But i am unable to execute any of the testcases. When i press the run ( or debug) button, nothing happens. There are no error messages popping up. I suspect it is a java configuration issue on my machine. I have tried comparing the settings with another machine where it is working fine. It is the first time that i am using RFT, so i do not know what to do. Can somebody please help me with this?
I have encountered the same issue. This may be because of workspace error. Create a new workspace and run the script.

ServiceStack.Examples Build FAIL all over the place on initial pull/clone from GitHub

this is EXTREMELY frustrating to anyone who just wants to pull down your code and check it out and get it to simple build successfully.
Here's the scoop.
So I open the ServiceStack.Examples-master\src\AppHarbor.sln after pulling it from github and cloning it to my local drive.
I have had nothing but trouble from the get go. I have had to fix this solution and project reference as well as assembly references.
there's nothing more irritating to a developer no matter if it's an internal solution or set of .NET projects or external, that bomb during initial build. This stuff should be building period.
Also when I can't even download an examples solution and get it to build it makes people wonder how well this open source API really is, can I truly even rely on it? This reflects on you Service Stack.
here's is what I did, nothing out of the norm here:
1) Cloned ServiceStack.Examples to my local c:\www\Sandbox folder where I keep stuff I'm playing around with
2) Just looking at the folder structure from the start, it makes no sense in terms of being discoverable and more importantly organized. For example why is there yet another ServiceStack.Examples inside src and then outside of that a ton of other example folders of other example apps in the root of \src also??? So you have stuff in src\ and in src\ServiceStack.Examples, this is hell confusing and disorganized.
ServiceStack.Examples\src\ServiceStack.Examples
3) Opened C:\www\Sandbox\ServiceStack.Examples\src\AppHarbor.sln
4) Tried to build all, and the first major problem is the MovieRest project doesn't load. I get an error while opening the .sln that it failed to load it:
ok fine, this is still ridiculous, nobody who downloads a solution should need to worry about fixin this but of course I did, so I readded it because in actuality this .csproj was moved into the src\ServiceStack.MovieRest\Web\ folder and looks to me like nobody even reopened the solution to fix it??
5) So then I go to try and build the solution again, notice all the missing binary references in MovieRest. So ultimately I figured ok, looks like pretty much every other project is getting their references from their associated packages folder however for some Reason MovieRest and the Nortwind projects don't have anything in their packages folder. so I end up manuall opening up the MovieRest VS 2012 solution and building it, and I guess Nuget must run or something during that build? Because now walla, I see the missing assemblies pop into ServiceStack.Examples\src\ServiceStack.MovieRest\packages finally.
6) Ok, so I rebuild again, and now it's complaining about missing sqllite assemblies and also a sqllite3.exe. So now I have to hunt around again to find them for the x84 and x64 and copy those missing assmblies back into ServiceStack.Examples\src\ServiceStack.MovieRest\Web\sqlite and I also noticed that MoviewRest project was referencing sqllite3.dll in the root of the project which was also missing...this is such a mess.
7) I notice that the Northwind project doesn't build either
I don't know what is going on here, I mean is the build really that messed up? Has to be.
Who is gonna fix this on the ServiceStack end? how the heck do I get this to finally build and how has this not been reported?
UPDATED 9/23
Here are the errors I get after pulling down the "fixed" solution. I did a Shift + Ctrl + B on it (Build All). Let me know if I am just missing something here but it's not building yet at least on my side:
UPDATE 10/1
Ok again lets talk about this.
I pulled this zip down: https://github.com/ServiceStack/ServiceStack/archive/v3-snapshot.zip from this page: https://github.com/ServiceStack/ServiceStack/releases
Opened the solution src\ServiceStack.sln (VS 2012 version)
First I get this SQL Express Error after opening it for the first time:
Now I try to build all on the solution and I get this build error:
So tell me what I could possibly doing wrong? This is a "Release" right? It should build right? It's not rocket science so how can people say this is a "dev consumer" issue? All I want is a stable release build. Simple.
I've just upgraded ServiceStack.Examples to VS 2013/IIS Express and updated it to the latest version of ServiceStack v3.9.63 that was just deployed. It should all build now, also some examples requires redis to be running on localhost.

Resources