-
Notifications
You must be signed in to change notification settings - Fork 380
Investigation: Shakapacker 9.0.0-beta.5 npm package issue #661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Found that beta.5 npm package is missing compiled JavaScript files. The package only contains TypeScript source files without the build output. Key findings: - Beta.4 works but defaults to SWC (need to set javascript_transpiler: babel) - Beta.5 has only .ts files, missing all .js compilation output - Issue is in the npm publishing process, not the code itself Created detailed issue report for shakapacker maintainers. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
WalkthroughBumps Shakapacker from 8.2.0 to 9.0.0-beta.5 in Gemfile and package.json, adds javascript_transpiler: babel to config/shakapacker.yml, and adds SHAKAPACKER_BETA5_ISSUE.md documenting a packaging issue with beta.5. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🚀 Quick Review App Commands
Welcome! Here are the commands you can use in this PR:
/deploy-review-app
Deploy your PR branch for testing
/delete-review-app
Remove the review app when done
/help
Show detailed instructions, environment setup, and configuration options.
Code Review for PR #661: Investigation of Shakapacker 9.0.0-beta.5 Issue
Thank you for this thorough investigation into the Shakapacker beta.5 issue! Here's my review:
✅ Strengths
-
Excellent Documentation: The SHAKAPACKER_BETA5_ISSUE.md file provides clear, detailed investigation results with concrete examples showing the difference between working (beta.4) and broken (beta.5) package structures.
-
Root Cause Analysis: You've correctly identified that the npm package is missing compiled JavaScript files, containing only TypeScript sources.
-
Practical Workarounds: Providing both a version recommendation (use beta.4) and the necessary configuration change (javascript_transpiler: babel) is very helpful.
⚠️ Concerns & Recommendations
-
Dependency Upgrade Risk: The PR currently upgrades to the broken beta.5 version in Gemfile, package.json, and lock files. This will break the build for anyone pulling these changes. Consider:
- Reverting to beta.4 or stable 8.x version
- Or keeping this as a demonstration branch without merging
-
Configuration Change: Adding javascript_transpiler: babel to shakapacker.yml is good for beta.4 compatibility, but may not be needed if reverting to stable version.
-
Missing Tests: Consider adding a simple smoke test or build verification to catch similar package issues early.
🐛 Potential Issues
- The current state will fail on npm install or yarn install due to the missing index.js file in beta.5
- Any CI/CD pipelines will break with these changes
🔒 Security
No security concerns identified - this is purely a build/packaging investigation.
💡 Suggestions
-
Report Upstream: Have you opened an issue with the Shakapacker maintainers? This detailed analysis would be valuable for them.
-
Version Pin: Consider pinning to beta.4 with a comment explaining why beta.5 is skipped:
# Note: beta.5 has missing compiled JS files - using beta.4 gem "shakapacker", "9.0.0.beta.4"
-
CI Protection: Add a webpack build step to CI to catch similar issues automatically.
Summary
Great investigative work identifying a critical issue in the beta.5 package! However, the PR as-is would break the build. I recommend either:
- A) Reverting dependencies to working versions (beta.4 or stable 8.x)
- B) Keeping this as an investigation-only branch that won't be merged
- C) Adding clear warnings that this is for demonstration purposes only
The documentation file is excellent and should definitely be preserved, perhaps in a docs/ folder or as part of an issue report to Shakapacker maintainers.
🤖 Generated with Claude Code
@coderabbitai
coderabbitai
bot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
SHAKAPACKER_BETA5_ISSUE.md (1)
10-48
: Add language identifiers to the fenced code blocks.Markdownlint (MD040) is flagging the untyped fences here. Add language hints so downstream tooling (and GitHub’s renderer) can highlight correctly.
-``` +```text Error: Cannot find module '/path/to/node_modules/shakapacker/package/index.js'Repeat for the bash and JSON snippets (`bash`, `json`). </blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used**: CodeRabbit UI **Review profile**: CHILL **Plan**: Pro <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 25bc5eaa1ed20924ff9d5b55be6b463f20cc83a3 and 95f2d0e02363259044bf5a0a5a7562269580e193. </details> <details> <summary>⛔ Files ignored due to path filters (2)</summary> * `Gemfile.lock` is excluded by `!**/*.lock` * `yarn.lock` is excluded by `!**/yarn.lock`, `!**/*.lock` </details> <details> <summary>📒 Files selected for processing (4)</summary> * `Gemfile` (1 hunks) * `SHAKAPACKER_BETA5_ISSUE.md` (1 hunks) * `config/shakapacker.yml` (1 hunks) * `package.json` (1 hunks) </details> <details> <summary>🧰 Additional context used</summary> <details> <summary>🪛 markdownlint-cli2 (0.18.1)</summary> <details> <summary>SHAKAPACKER_BETA5_ISSUE.md</summary> 10-10: Fenced code blocks should have a language specified (MD040, fenced-code-language) </details> </details> </details> <details> <summary>⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)</summary> * GitHub Check: claude-review </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not upgrade to beta.5—it ships without compiled JS output.
Line 9 pulls in shakapacker 9.0.0.beta.5, but the investigation doc in this PR shows that beta.5 is published without any compiled .js
files, so webpack fails with "Cannot find module ‘.../shakapacker/package/index.js’." Shipping this version will break every build. Please stick to 9.0.0-beta.4 (or 8.x) until beta.5 is republished with the compiled output.
Apply this diff to keep the project working:
-gem "shakapacker", "9.0.0.beta.5" +gem "shakapacker", "9.0.0.beta.4"
📝 Committable suggestion
!!️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
🤖 Prompt for AI Agents
In Gemfile around line 9, the project currently specifies gem "shakapacker",
"9.0.0.beta.5" which is a broken release missing compiled JS; change the Gemfile
to pin a safe version (e.g. "9.0.0-beta.4" or an 8.x release) by replacing the
version string on that line with the chosen stable version and run bundle
install to update Gemfile.lock.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep npm on beta.4 until beta.5 is republished with JS builds.
Line 96 updates npm to shakapacker@9.0.0-beta.5
, but that package is missing all compiled JavaScript files, so require('shakapacker')
blows up at runtime. This mirrors the failure documented in SHAKAPACKER_BETA5_ISSUE.md. Please revert to beta.4 (or another working release) until beta.5 includes its build artifacts.
- "shakapacker": "9.0.0-beta.5", + "shakapacker": "9.0.0-beta.4",
📝 Committable suggestion
!!️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
🤖 Prompt for AI Agents
In package.json around line 96, the dependency was upgraded to "shakapacker":
"9.0.0-beta.5" but that release is missing compiled JS and breaks
require('shakapacker'); change the version back to a known-good release (e.g.
"9.0.0-beta.4" or another working tag), then update the lockfile and reinstall
dependencies (npm install or npm ci) and run the test/start script to verify the
runtime no longer fails; once beta.5 includes builds you can bump the version
and repeat verification.
Uh oh!
There was an error while loading. Please reload this page.
Summary
Investigated issues with shakapacker beta versions and found critical issue with 9.0.0-beta.5 npm package.
Findings
Beta.5 Issue
Beta.4 Status
javascript_transpiler: babel
in shakapacker.ymlDetails
See SHAKAPACKER_BETA5_ISSUE.md for complete investigation details and comparison between versions.
Recommendations
🤖 Generated with Claude Code
This change is Reviewable
Summary by CodeRabbit