Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

fix publish script

Carl-Gerhard Lindesvärdfe6f4a8f39b6
diff --git a/tooling/publish/publish.ts b/tooling/publish/publish.ts
index 6b92adb0a..e47f01535 100644
--- a/tooling/publish/publish.ts
+++ b/tooling/publish/publish.ts
@@ -17,6 +17,7 @@ function exit(message: string, error?: unknown) {
console.log(`❌ ${message}`);
if (error instanceof Error) {
console.log(`Error: ${error.message}`);
+ console.log(error);
} else if (typeof error === 'string') {
console.log(`Error: ${error}`);
}
@@ -82,11 +83,11 @@ function main() {
try {
execSync('npm publish --access=public', {
- cwd: './packages/sdk',
+ cwd: workspacePath('./packages/sdk'),
});
execSync('npm publish --access=public', {
- cwd: './packages/types',
+ cwd: workspacePath('./packages/types'),
});
} catch (error) {
exit('Failed publish packages', error);