-
-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
Description
The next code doesn't work. It mostly from the example
import NpmApi from 'npm-api';
export const search = async (query) => {
try {
const npm = new NpmApi();
debugger;
let view = npm.view('listAll');
let pkg = await view.query({
// group_level: 4,
startkey: JSON.stringify(['react']),
endkey: JSON.stringify(['react', {}])
});
debugger
if (pkg.length > 0) {
let val = pkg[0].value;
let latest = val.versions[val['dist-tags'].latest];
}
debugger
} catch (err) {
console.log(err);
throw err;
}
}
I know that package react ixists, but code upper there shows that such package doesn't exist.
Reactions are currently unavailable