necccc / npm-migrate

Migrate all versions of a selected package from a registry to another one
MIT License
21 stars 14 forks source link

Update npm_utils.js #11

Open amcereijo opened 2 years ago

amcereijo commented 2 years ago

Check if there is data in new registry. When no data, value is {} and a error is throw at

const latest = Object.keys(data)[0];
const newRegistryVersions = data[latest].versions;
prachikhadke commented 1 year ago

Thanks for this fix. I ran into the exact same problem.