diff --git a/package.json b/package.json index 04ac7bd3..5e2c93c6 100755 --- a/package.json +++ b/package.json @@ -14,8 +14,8 @@ "dev:server": "cd packages/server && yarn dev", "dev:client": "cd packages/app && yarn dev", "release": "node ./scripts/release.js", - "post:deploy": "node ./scripts/post-deploy.js", - "postinstall": "npm rebuild @tensorflow/tfjs-node --build-from-source && node ./scripts/post-install.js" + "postdeploy": "node ./scripts/post-deploy.js", + "postinstall": "node ./scripts/post-install.js" }, "workspaces": [ "packages/**" diff --git a/scripts/post-install.js b/scripts/post-install.js index a3ec767c..c79a379d 100644 --- a/scripts/post-install.js +++ b/scripts/post-install.js @@ -89,6 +89,13 @@ async function main() { await initializeEvite() + console.log("Rebuilding TFJS...") + + await child_process.execSync("npm rebuild @tensorflow/tfjs-node --build-from-source &&", { + cwd: rootPath, + stdio: "inherit", + }) + // read dir with absolute paths let packages = await getPackages()