jeffijoe / typesync

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

typesync@0.5.0 Could not resolve 'packageSource' error #28

Closed IllusionMH closed 5 years ago

IllusionMH commented 5 years ago

When I'm trying to use latest version (0.5.0) there is an error in console and package.json is not updated.

Issue reproducible on Windows and Linux, for Node v9, v10, and v11. Tried just npx, global installation, and local installation.

package.json content:

{
  "name": "typesync-repro",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "backbone": "1.1.2",
    "bootstrap": "^3.3.7",
    "react": "^16.6.0"
  }
}

Console output:

$ npx typesync
✖  Could not resolve 'packageSource'.

Resolution path: typeSyncer -> packageSource
Stack:
AwilixResolutionError: Could not resolve 'packageSource'.

Resolution path: typeSyncer -> packageSource
    at resolve (/app/node_modules/awilix/lib/container.js:226:23)
    at dependencies.map.p (/app/node_modules/awilix/lib/resolvers.js:298:52)
    at Array.map (<anonymous>)
    at Object.resolve (/app/node_modules/awilix/lib/resolvers.js:298:43)
    at Object.resolve (/app/node_modules/awilix/lib/container.js:236:41)
    at /app/node_modules/typesync/lib/cli.js:78:56
    at step (/app/node_modules/typesync/lib/cli.js:36:23)
    at Object.next (/app/node_modules/typesync/lib/cli.js:17:53)
    at /app/node_modules/typesync/lib/cli.js:11:71
    at new Promise (<anonymous>)
jeffijoe commented 5 years ago

Ah, I forgot to register the new component, oops! 😅 Fixed in 0.5.1!

IllusionMH commented 5 years ago

Wow, that was really quick fix 👍 Thank you!