Compare commits

..

No commits in common. "package-json-error" and "master" have entirely different histories.

1 changed files with 307 additions and 312 deletions

View File

@ -261,12 +261,7 @@ const pkg = getPackageJson();
})();
function getPackageJson() {
const pathToPackage = path.join(workspace, 'package.json');
console.log({
pathToPackage,
workspace,
})
if (!existsSync(pathToPackage)) throw new Error("package.json could not be found in your project's root.");
return require(pathToPackage);
}