Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with offline dojo and host resolve #284

Open
gardiol opened this issue May 23, 2019 · 4 comments
Open

Issue with offline dojo and host resolve #284

gardiol opened this issue May 23, 2019 · 4 comments
Assignees

Comments

@gardiol
Copy link

gardiol commented May 23, 2019

**Bug **

I am using Dojo on a completely offline machine. It has a network, but the network is a private network with no internet, which had not and never will have any internet.

I "installed" dojo on an on-line machine, locally, then tarred up the archive and moved via USB key to the offline one. I can successfully create build and serve applications.

The problem is, when running at least the following commands:

dojo (no arguments)
dojo create app
dojo build --watch --serve

i always get a lag (a few seconds) and the following error message:
"There was an error searching npm: request to https://registry.npmjs.org/-/v1/search?text= failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org:443"

The error (sorry for typos, i copied by hand) is clearly because the pc is offline and the name cannot be resolved. But it's annoying because it add a few seconds delay each time.
Can this behaviour be eliinated or disabled in some way?

Environment is Linux, offline pc is CentOS 7.

Package Version: Dojo/[email protected] Dojo/[email protected] nodejs-10.15.3

Code

Expected behavior:

Actual behavior:

@JamesLMilner
Copy link
Contributor

Hi @gardiol, thanks for raising this. We can reproduce this issue, we'll look into fixing it.

@JamesLMilner JamesLMilner self-assigned this May 29, 2019
@agubler
Copy link
Member

agubler commented Nov 22, 2019

@JamesLMilner did you get anywhere with this?

@JamesLMilner
Copy link
Contributor

I believe that this issue is actually an example of some of the issues we had in #275. Me and @matt-gadd aimed to improve this in #283.

If I delete the command cache provided by configstore (generally found in ~/.config/) then go offline and run dojo you'll see the finish time is much faster than the time you described. We do still have the error message you described and perhaps we should print something a bit more user friendly there if possible.

Screenshot_20191216_110734

As such I believe the issue of speed is resolved, but if you believe otherwise please feel free to follow up.

@prstorero
Copy link

Hi there, I was directed here by Matt to post my current problem.

Is it possible to run "dojo create app" through a proxy? When attempting to create an app on my work system, we end up with

There was an error searching npm: request to https://registry.npmjs.org/-/v1/search?text=%40dojo%2Fcli-&size=20&from=0&quality=0.65&popularity=0.98&maintenance=0.5 failed, reason: connect ECONNREFUSED 104.16.19.35:443. Then at the end of the process you get Running npm install failed npm install exit code: 1, which maybe be due to the connection refused issue.

After trying a bunch of things, we decided to see if curl for the same url would work, and when run with our proxy, it does. But we haven't figured out anything for allowing that connection during the dojo create app process. We also discovered that the bae of that url is inserted internally in some of the dojo files that a coworker found. He did a find and replace on all of them to try http instead of https, which didn't work.

I'll be happy to provide any additional details anyone may require.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants