diff --git a/.changeset/postinstall-missing-dist-scripts.md b/.changeset/postinstall-missing-dist-scripts.md new file mode 100644 index 00000000..aaf0c4c8 --- /dev/null +++ b/.changeset/postinstall-missing-dist-scripts.md @@ -0,0 +1,5 @@ +--- +'@react-native-ama/core': patch +--- + +fix: postinstall script crashed on every external install with `Cannot find module './../dist/scripts/create-config.js'`. `create-config.ts` lived outside `src/`, so `tsconfig.build.json` (which only compiles `src/**/*`) never built it into `dist/scripts/create-config.js`. Moved the script into `src/scripts/` so it's included in the normal build. Only reproduces for real external installs — the monorepo's own dev loop skips this code path via `postinstall.js`'s `isMonorepo` guard, which is why it wasn't caught before publishing `2.0.0-beta.0`. diff --git a/packages/core/package.json b/packages/core/package.json index 97ec4f8c..32cfb2b6 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -44,8 +44,7 @@ }, "files": [ "src", - "dist", - "dist/scripts" + "dist" ], "scripts": { "build": "rm -rf dist && ../../node_modules/.bin/tsc -p ./tsconfig.build.json", diff --git a/packages/core/scripts/create-config.ts b/packages/core/src/scripts/create-config.ts similarity index 100% rename from packages/core/scripts/create-config.ts rename to packages/core/src/scripts/create-config.ts