diff --git a/package.json b/package.json
index 3769e9351225e119e5df1a2aa0210f1f1eab0ac4..7673e62b77fe9282e3d720430a22bb6158ab0070 100644
--- a/package.json
+++ b/package.json
@@ -22,7 +22,7 @@
     "test": "test"
   },
   "scripts": {
-    "postinstall": "tsc",
+    "prepublish": "tsc",
     "tsc": "tsc",
     "test": "nyc --reporter html mocha",
     "start": "node bin/duniter start",