Compare commits
No commits in common. "package-json-error" and "master" have entirely different histories.
package-js
...
master
5
index.js
5
index.js
|
@ -261,12 +261,7 @@ const pkg = getPackageJson();
|
||||||
})();
|
})();
|
||||||
|
|
||||||
function getPackageJson() {
|
function getPackageJson() {
|
||||||
|
|
||||||
const pathToPackage = path.join(workspace, 'package.json');
|
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.");
|
if (!existsSync(pathToPackage)) throw new Error("package.json could not be found in your project's root.");
|
||||||
return require(pathToPackage);
|
return require(pathToPackage);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue