jeffijoe / typesync

Install missing TypeScript typings for dependencies in your package.json.
MIT License
1.51k stars 21 forks source link

Typesync is not working anymore #50

Closed mubaidr closed 4 years ago

mubaidr commented 4 years ago

Tested on Windows 10 and Ubuntu. Typesync just stuck at:

»  TypeSync v0.6.1
⠏  Syncing type definitions in package.json...

OS: Windows 10 (also tested on Ubuntu) Node: 13 npm: 6.14.4

jeffijoe commented 4 years ago

It works fine.

Please check your network conditions, that you don't have a (coorporate?) firewall blocking TypeSync or anything of the like. It could also be that Azure Blob Storage is having problems at the time you were trying (that's where Microsoft hosts the type definition lookup file that TypeSync uses).

image

mubaidr commented 4 years ago

Strange. I am not behind any proxy. npm installs and other npm tools tools works fine (e.g. npm-check-updates).

How can i debug this issue? any logs?

jeffijoe commented 4 years ago

Open the type def source file, try downloading the index manually, see if you can.

mubaidr commented 4 years ago

Yes, I am able to download file in both environments.

jeffijoe commented 4 years ago

Maybe in the compiled code, try placing console logs before and after the fetch to see if that even is the issue. Sorry I don’t have any ideas what this could be because I can’t reproduce it at all.

mubaidr commented 4 years ago

I will try that.

mubaidr commented 4 years ago

So I tried ignoring deps and it worked. Looks like there is some dependency which could be causing the issue.

typesync --ignoredeps=deps

dependencies in my project:

"dependencies": {
    "axios": "^0.19.2",
    "bcrypt": "^4.0.1",
    "body-parser": "^1.19.0",
    "chalk": "^4.0.0",
    "clockwork": "^0.1.4",
    "compression": "^1.7.4",
    "dotenv": "^8.2.0",
    "errorhandler": "^1.5.1",
    "express": "^4.17.1",
    "express-session": "^1.17.1",
    "express-status-monitor": "^1.2.11",
    "lusca": "^1.6.1",
    "mailchecker": "^3.3.4",
    "moment": "^2.24.0",
    "morgan": "^1.10.0",
    "multer": "^1.4.2",
    "nodemailer": "^6.4.6",
    "passport": "^0.4.1",
    "passport-facebook": "^3.0.0",
    "passport-github2": "^0.1.12",
    "passport-google-oauth": "^2.0.0",
    "passport-instagram": "^1.0.0",
    "passport-linkedin-oauth2": "^2.0.0",
    "passport-local": "^1.0.0",
    "passport-oauth": "^1.0.0",
    "passport-oauth2-refresh": "^2.0.0",
    "passport-openid": "^0.4.0",
    "passport-snapchat": "^1.0.0",
    "passport-twitch-new": "^0.0.1",
    "passport-twitter": "^1.0.4",
    "pg": "^8.0.2",
    "pg-pool": "^3.1.0",
    "validator": "^13.0.0"
  },
  "devDependencies": {
    "@typescript-eslint/eslint-plugin": "^2.28.0",
    "@typescript-eslint/parser": "^2.28.0",
    "concurrently": "^5.1.0",
    "eslint": "^6.8.0",
    "eslint-config-prettier": "^6.10.1",
    "eslint-plugin-jest": "^23.8.2",
    "eslint-plugin-prettier": "^3.1.3",
    "jest": "^25.3.0",
    "prettier": "^2.0.4",
    "supertest": "^4.0.2",
    "ts-jest": "^25.4.0",
    "ts-node": "^8.8.2",
    "typescript": "^3.8.3"
  },
mubaidr commented 4 years ago

Its the express-session package. If it is present in package json typesync never finish the job.

jeffijoe commented 4 years ago

That’s very strange. What’s so special about that package?

mubaidr commented 4 years ago

I don't know but when I remove this package from dependencies typesync works as expected.

eithermonad commented 4 years ago

I just attempted to reproduce your issue, both on Windows 10 and Ubuntu through the WSL, to no avail. I created an empty project and added the dependencies and devDependencies from your package.json to mine. I then ran npm i and typesync package.json.

Typesync worked correctly and I couldn't reproduce your issue:

image

Environment:

npm: v6.13.4
node: v12.16.0
OS: Microsoft Windows [Version 10.0.18363.778]

typesync: v0.6.1
mubaidr commented 4 years ago

I will check again with both local and global install of typesync

mubaidr commented 4 years ago

Yes, working fine now. Do not know what was the reason. :( Now global, local and npx all works fine.