We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c01635e commit 1bf5592Copy full SHA for 1bf5592
scripts/sync-version.mjs
@@ -28,9 +28,16 @@ async function main() {
28
'version.ts'
29
);
30
31
- const litClientPackageJson = JSON.parse(
32
- await readFile(litClientPackageJsonPath, 'utf8')
33
- );
+ let litClientPackageJson;
+ try {
+ litClientPackageJson = JSON.parse(
34
+ await readFile(litClientPackageJsonPath, 'utf8')
35
+ );
36
+ } catch (err) {
37
+ throw new Error(
38
+ `Failed to read or parse package.json at ${litClientPackageJsonPath}: ${err.message}`
39
40
+ }
41
const litClientVersion = litClientPackageJson.version;
42
43
if (!litClientVersion) {
0 commit comments