TypeScript type definitions cannot be downloaded.
laszlopandy opened this issue · 1 comments
laszlopandy commented
TypeScript type definition packages are available on npm under the scope @types/
. For example npm install @types/node
. These packages are not correctly extracted when using gradle clientInstall
.
In a normal npm package, the files are stored under the package
directory:
$ tar -tf example-package.tgz
package/package.json
package/index.js
package/license
package/readme.md
But in @types
packages, it seems they use different folder names:
$ tar -tf node-7.0.4.tgz
node/README.md
node/index.d.ts
node/package.json
node/types-metadata.json
$ tar -tf react-15.0.6.tgz
react/README.md
react/index.d.ts
react/package.json
react/types-metadata.json
To solve this, NpmUtil.extractTarball
needs to not be hardcoded to package/
but look for a single top-level folder with any name.
craigburke commented
Thank you, that's very helpful. I appreciate that.