Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Typings install hangs #537

Open
IljaKroonen opened this issue May 21, 2016 · 17 comments
Open

Typings install hangs #537

IljaKroonen opened this issue May 21, 2016 · 17 comments

Comments

@IljaKroonen
Copy link

IljaKroonen commented May 21, 2016

Description

typings install commands hangs without error message

Steps to Reproduce

  1. Create an empty folder
  2. Add this typings.json file
{
    "globalDependencies": {
        "compression": "registry:dt/compression#0.0.0+20160501162003",
        "cookie-parser": "registry:dt/cookie-parser#1.3.4+20160316155526",
        "express": "registry:dt/express#4.0.0+20160317120654",
        "express-serve-static-core": "registry:dt/express-serve-static-core#0.0.0+20160322035842",
        "mime": "registry:dt/mime#0.0.0+20160316155526",
        "node": "registry:dt/node#4.0.0+20160509154515",
        "react": "registry:dt/react#0.14.0+20160423065914",
        "react-dom": "registry:dt/react-dom#0.14.0+20160412154040",
        "serve-static": "registry:dt/serve-static#0.0.0+20160501131543",
        "winston": "registry:dt/winston#0.0.0+20160417152829"
    },
    "dependencies": {
        "react-redux": "registry:npm/react-redux#4.4.0+20160207114942",
        "react-router": "registry:npm/react-router#2.0.0+20160214194820",
        "redux": "registry:npm/redux#3.0.6+20160214194820",
        "sequelize": "registry:npm/sequelize#3.0.0+20160506115852"
    }
}
  1. run "typings install"

Expected behavior: the command terminates and a new typings folder contains the definitions

Actual behavior: The command does not terminate and no error is reported even after several hours
Output:
typings install typings WARN badlocation "github:andrew-w-ross/typings-redux" is mutable and may change, consider specifying a commit hash

Versions

1.0.4

@demurgos
Copy link

demurgos commented May 21, 2016

I followed your steps and was unable to reproduce your issue. (The files were installed successfully).

Could you provide more context about your environment ?

I tested on a Windows 7 machine with Node v6.1.0 and typings v1.0.4.


Side note:
You can us fenced code to properly format files in markdown:

 ````json
 {
    "globalDependencies": {
    ...
     }
  ...
 }
 ````

@IljaKroonen
Copy link
Author

IljaKroonen commented May 21, 2016

I'm on Windows 10. I use the mingw bash that comes with git-scm.

$ node --version
v5.6.0

I'm thinking of a networking issue or something like that, but in that case there still should be some kind of timeout error.

EDIT:
Same issue on node 6.2

Also, the process randomly goes less far or farther. Sometimes it outputs nothing, sometimes one warning like the original report, and sometimes the two lines as below:

$ typings install
typings WARN badlocation "github:andrew-w-ross/typings-redux" is mutable and may change, consider specifying a commit hash
typings WARN badlocation "github:andrew-w-ross/typings-history" is mutable and may change, consider specifying a commit hash

EDIT:
Same issue in a debian 8 vm with node 6.2.

@IljaKroonen
Copy link
Author

I can confirm that the typings did not install because of a networking issue. If I use a french VPN, it works perfectly. I think the networking issue itself it not at all an issue with this project. However, typings should IMHO timeout and show an error pinpointing which mirror is at fault.

@SteveVanOpstal
Copy link

Got the same issue on Windows 10, node 6.2.0

@SteveVanOpstal
Copy link

For me it hangs for about half of the requests I perform. So it is highly likely that it is a network or server issue. However as @IljaKroonen already mentioned, a timeout with an error would be nice.

@banacorn
Copy link

banacorn commented Jun 5, 2016

It hangs when I'm in some crappy public network (which would likely to block some ports).

And something strange happened as I performed this:

$ typings bundle -o dist/atom.d.ts`

It complained that:

typings ERR! message Unable to infer typings name from project. Use the `--name` flag to specify it manually

And even after I supplied it with name, still:

$ typings bundle --name atom -o dist/atom.d.ts
typings ERR! message Unable to resolve entry ".d.ts" file for "atom", please make sure the module has a main or typings field

While typings.json was just sitting there in the project directory all the time, with every typings field it cried for.

But none of these would happen when I'm in some better network environment and it works just fine, no hangs, no complains:

$ typings bundle -o dist/atom.d.ts

@unional
Copy link
Member

unional commented Jun 5, 2016

That's strange. Should bundle access internet at all?

@banacorn
Copy link

banacorn commented Jun 5, 2016

I found that It does! It leaves some header like this in the generated file, which would require internet access (for that permalink)

Source: https://raw.githubusercontent.com/typed-typings/npm-event-kit/3ad17c029eb8899b613cdf8229964e67fb19cef7/lib/event-kit.d.ts

@unional
Copy link
Member

unional commented Jun 5, 2016

Yeah it does. It simply re-resolve the dependencies by loading them from Internet.

I just wonder what is the general use case of bundle besides how we are using it now.

Right now we use it within typings repo and the typings folder should already populated. So maybe prefer or rely one the existence of local typings could/should be a better route.

@unional
Copy link
Member

unional commented Jun 5, 2016

@banacorn, I'm on my phone right now so it's hard for me to create new issue. Can you help me to create a new issue on this bundle logic to see if we can make it an enhancement? Thanks

@banacorn
Copy link

banacorn commented Jun 5, 2016

@unional Sure 👍

@martin5211
Copy link

martin5211 commented Jun 27, 2016

I have the same issue on node 6.2.2. Typings hangs without giving any response or an error even when executing the command "typings list".

image

@papmodern
Copy link

My situation is the same.
But when I try to install typings in other folders everything goes perfectly. But in my project folder it hangs always. Maybe there is some conflict with other packages !

@papmodern
Copy link

Renaming typings folder or config file didn't changed anything.

@unional
Copy link
Member

unional commented Sep 5, 2016

@papmodern , although unlikely to cause the hang, can you check if you have a different version of typings in your project?

@neopostmodern
Copy link

Can report another reproduction on Ubuntu 16.04, node 6.8.1, typings 1.4.0...
After about half an hour I get the following ouput:

typings WARN badlocation "github:mattiamanzati/typings-material-ui" is mutable and may change, consider specifying a commit hash
typings WARN deprecated 10/15/2016: "registry:npm/lodash#4.0.0+20160723033700" is deprecated (updated, replaced or removed)
typings WARN deprecated 9/15/2016: "registry:npm/react-router#2.4.0+20160811060709" is deprecated (updated, replaced or removed)
typings WARN deprecated 10/8/2016: "registry:dt/react#0.14.0+20160829191040" is deprecated (updated, replaced or removed)
typings WARN badlocation "github:andrew-w-ross/typings-redux" is mutable and may change, consider specifying a commit hash
typings WARN badlocation "github:andrew-w-ross/typings-history" is mutable and may change, consider specifying a commit hash
typings WARN badlocation "github:andrew-w-ross/typings-redux" is mutable and may change, consider specifying a commit hash
typings WARN deprecated 10/6/2016: "registry:dt/redux-actions#0.8.0+20160521154116" is deprecated (updated, replaced or removed)
        (node:15996) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): PopsicleError: Unable to connect to "https://raw.githubusercontent.com/mattiamanzati/typings-material-ui/master/svg-icons/action/chrome-reader-mode.d.ts"
Caused by: Error: read ETIMEDOUT
(node:15996) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): PopsicleError: Unable to connect to "https://raw.githubusercontent.com/mattiamanzati/typings-material-ui/master/svg-icons/action/eject.d.ts"
Caused by: Error: read ETIMEDOUT
(node:15996) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): PopsicleError: Unable to connect to "https://raw.githubusercontent.com/mattiamanzati/typings-material-ui/master/svg-icons/action/description.d.ts"
Caused by: Error: read ETIMEDOUT
(node:15996) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): PopsicleError: Unable to connect to "https://raw.githubusercontent.com/mattiamanzati/typings-material-ui/master/svg-icons/action/delete-forever.d.ts"
Caused by: Error: read ETIMEDOUT
(node:15996) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 5): PopsicleError: Unable to connect to "https://raw.githubusercontent.com/mattiamanzati/typings-material-ui/master/svg-icons/action/receipt.d.ts"
Caused by: Error: read ETIMEDOUT
^[[2D
├── lodash@4.0.0
├─┬ material-ui@0.15.1
│ └── react
├─┬ react-dom
│ └── react
├─┬ react-redux
│ └── redux
├─┬ react-router@2.4.0
│ └── history
├─┬ react-router-redux
│ ├── history
│ └── redux
├── isomorphic-fetch (global)
├── marked (global)
├── react (global)
├── redux (global)
└── redux-actions (global)

I then opened one of the files (https://raw.githubusercontent.com/mattiamanzati/typings-material-ui/master/svg-icons/action/eject.d.ts) in my browser, seems to work fine. curl was suspiciously slow on the first few tries but now works fine too (less than 10 seconds).

Network is otherwise stable, tried two, very reliable European VPNs in different countries with no success either.

@m3talsmith
Copy link

OS X here. I have it hang constantly. There should be a timeout added that reports the network info of the part that timed out.

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

No branches or pull requests

10 participants