fix: npm 7+ removes info from json response, so don't rely on it anymore
MODIFY
lib/cli/npm.js
lib/cli/npm.js
-import _ from 'lodash';
import path from 'path';
import semver from 'semver';
import { exec } from 'teen_process';
@@ -125,14 +124,6 @@ export default class NPM {
if (res.json.error) {
throw new Error(res.json.error);
}
-
- // if we tried to install a package via git/github, we might not have been
- // certain of the package name, so if we can retrieve it unambiguously from
- // the json report of the install, do so
- const names = _.uniq([...res.json.added, ...res.json.updated].map((x) => x.name));
- if (names.length === 1) {
- pkgName = names[0];
- }
}
// Now read package data from the installed package to return, and make sure

fix: npm 7+ removes info from json response, so don't rely on it anymore