create-remix fails behind proxy
See original GitHub issueWhat version of Remix are you using?
1.4.3
Steps to Reproduce
Run npx create-remix
when you are behind a corporate proxy.
Expected Behavior
create-remix
should work, either getting proxy config from environment variables or allowing users to pass it as a parameter.
Actual Behavior
After answering the questions, the installation fails with the following message:
>npx create-remix
Need to install the following packages:
create-remix
Ok to proceed? (y) y
? Where would you like to create your app? ./my-remix-app
? What type of app do you want to create? Just the basics
? Where do you want to deploy? Choose Remix if you're unsure; it's easy to change deployment targets. Remix App Server
? Do you want me to run `npm install`? No
| Creating your app…request to https://codeload.github.com/remix-run/remix/tar.gz/main failed, reason: connect ETIMEDOUT 20.201.28.149:443
I confirmed the problem is actually proxy config by modifying the function downloadAndExtractTarball
in node_modules\@remix-run\dev\cli\create.js
. I just added my proxy config hard-coded with the help of https-proxy-agent
package. With the following change create-remix succeeded.
var HttpsProxyAgent = require('https-proxy-agent');
async function downloadAndExtractTarball(projectDir, url, {
token,
filePath
}) {
const proxyAgent = new HttpsProxyAgent('http://my.proxy.server:3128');
let response = await fetch__default["default"](url, token ? {
agent: proxyAgent,
headers: {
Authorization: `token ${token}`
}
} : {
agent: proxyAgent
});
// rest of the method
}
Issue Analytics
- State:
- Created a year ago
- Reactions:9
- Comments:8 (1 by maintainers)
Top Results From Across the Web
create-react-app doesn't work with proxy - Stack Overflow
I had this problem and I did everything "correct". For me GET requests were going to my proxy but not POST! I got...
Read more >Installing React-Admin In A Remix App - Marmelab
This article will go through each step needed to add React-Admin into a Remix app ... Instead, we add a Remix Route that...
Read more >Free Learning - Stephen Downes
I have written volumes of materials concerning the design, pedagogy and technology behind online learning. I have even been paid for my work...
Read more >React Proxy | Easiest Fix to CORS Errors - YouTube
Proxying API Requests in Development using Vite, Parcel, or Create React App. If your plan is to host your react app from the...
Read more >TRAKTOR PRO 3 Manual English - Native Instruments
Navigating through Folders in the Browser Tree . ... In this section you learn to create Remix Sets using the Remix Deck. You...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Please, guys. Fix this. It also happened to me. I think this is extremely important to be fixed since we’re trying to incorporate Remix on enterprise-level projects.
There are a lot of companies that use corporate proxies for security and we just can’t disable it.
My solution was to scaffold a Remix project at home and bring all files to the company, which is really annoying.
@rdscott-vrsk Apologies, this should have been closed after this fix was released and the original issue fixed.
Could you open a new issue giving us more information about your proxy setup? I’m sure we’ll sort it up!