Skip to content

Commit 5d5d989

Browse files
justin808claude
andcommitted
Fix workspace dependency resolution for react-on-rails
**Problem:** Pro packages were using `react-on-rails: "*"` which resolved to version 16.1.2 from npm instead of the workspace version 16.2.0-beta.12. This caused webpack build failures in CI when examples imported Pro packages via relative paths, because: 1. Example pack imports `../../../packages/react-on-rails-pro/lib/ReactOnRails.client.js` 2. Pro file imports `from 'react-on-rails/@internal/base/client'` 3. Webpack resolves from Pro package location, finding old 16.1.2 in node_modules 4. Old package.json lacks required exports like `./@internal/base/client` **Solution:** Changed Pro package dependencies from `"*"` to `"^16.2.0-beta.12"` to ensure workspace version is used. Yarn now properly hoists the workspace package to root node_modules. **Errors Fixed:** ``` Module not found: Error: Package path ./pageLifecycle is not exported Module not found: Error: Package path ./context is not exported Module not found: Error: Package path ./@internal/base/client is not exported ``` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent d5151db commit 5d5d989

File tree

3 files changed

+2308
-2518
lines changed

3 files changed

+2308
-2518
lines changed

packages/react-on-rails-pro-node-renderer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"node-html-parser": "^7.0.1",
5252
"nps": "^5.9.12",
5353
"pino-pretty": "^13.0.0",
54-
"react-on-rails": "*",
54+
"react-on-rails": "^16.2.0-beta.12",
5555
"redis": "^5.0.1",
5656
"sentry-testkit": "^5.0.6",
5757
"touch": "^3.1.0",

packages/react-on-rails-pro/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"./ServerComponentFetchError": "./lib/ServerComponentFetchError.js"
5656
},
5757
"dependencies": {
58-
"react-on-rails": "*"
58+
"react-on-rails": "^16.2.0-beta.12"
5959
},
6060
"peerDependencies": {
6161
"react": ">= 16",

0 commit comments

Comments
 (0)