-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
try removing webpacker lines from GitPod config #10137
Conversation
Codecov Report
@@ Coverage Diff @@
## main #10137 +/- ##
==========================================
- Coverage 82.13% 81.99% -0.15%
==========================================
Files 98 98
Lines 5968 5977 +9
==========================================
- Hits 4902 4901 -1
- Misses 1066 1076 +10
|
hmm, now says:
|
The Could this be applicable here? Lines 83 to 87 in d35d935
Does this count as a |
@@ -18,7 +18,6 @@ tasks: | |||
|
|||
yarn install | |||
|
|||
rails g webpacker:install && rails g webpacker:install:react && rails g react:install |
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.
I think i would guess it's 2) webpack has not yet re-run to reflect updates
-- so, if we remove the g
lines, which of these three ought we to keep if any?
rails webpacker:install && rails webpacker:install:react && rails g react:install
OK, building on notes in #9502, let's try linking each line to where we find what it does, in upstream source:
https://github.com/reactjs/react-rails#rails-5x describes all three commands, not sure of order:
According to the above, we could maybe leave only |
I think not. I think if you turn it on, it'll try to on-the-fly compile in production. But we want that only to happen in development. And GitPod would be running in development mode unless we explicitly switched it. |
Interesting possibly related error: rails/webpacker#1523 (but for vue) |
Wait, ok, so on reading the error above once more, I wonder @noi5e do we need to check in manifest.json to version tracking? |
Could this be relevant?
|
more discussion in rails/webpacker#2071 too... for context... |
OK, tried (in gitpod) running just
So, i think that's what I tried running it following the docs: https://github.com/webpack/webpack-dev-server#usage
|
OH! But actually the app loaded after
So we need to:
@noi5e what do you think? I added a commit with the |
Hmm, yeah ...
so i think i did install it but am not inserting the correct |
And now it's resulting in:
so let me see again how to run |
Slight clue in latest error:
|
i realized the npm module |
Oof, now i can't get the app to serve without the manifest.json error! |
maybe in part because |
also learning: https://webpack.js.org/configuration/dev-server/ |
I'm getting a little lost, I think I'm still behind where you're at in terms of understanding the issue. Just to reiterate where I think we are right now:
I think that's done in the install:react generator I haven't logged as much time as you working on this issue, but my gut feeling is that the solution will probably be tweaking the I can also start drafting an issue for the |
yeah i'm sorry, i'm a bit lost myself, it's so hard to keep an eye on the goal in the weeds like this. But, i just realized one thing - i've been adding extra modules via yarn to try to get this to work. But, i think i was getting a webpack version mismatch because i manually installed webpack via yarn! I tried uninstalling webpack via yarn and the site loaded correctly - i think my manual install was overriding the in-built version of webpack that comes in the rails/webpack gem! So, i may need to look at removing the webpack-cli stuff too? and that |
I think that's right! I've been browsing issues and solutions for this kind of thing (and we're not the only people dealing with this config stuff), and it seems like the solutions are usually more about tweaking lines in a config file.
In reading through these issues, I have also noticed that issues can crop up because of how these packages are installed. |
OK, i'll try running this on a freshly prebuilt gitpod... |
I think @noi5e is right and we will have to also include a |
Yes!!! |
output was:
but, despite the warnings and "file unchanged" it seems to do the trick. |
Code Climate has analyzed commit 5394db2 and detected 0 issues on this pull request. View more on Code Climate. |
Perfect. This worked. Merging!! |
Sentry issue: PLOTS2-1HG |
* remove 'g' from webpacker commands in .gitpod.yml re publiclab#9502 * remove all 3 webpacker/react install lines from .gitpod.yml * added @webpack-cli/serve npm module * added webpack/serve to gitpod.yml * yarn.lock * add webpack-cli * remove yarn-based webpack deps * more removal * re-add rails g react:install
* remove 'g' from webpacker commands in .gitpod.yml re publiclab#9502 * remove all 3 webpacker/react install lines from .gitpod.yml * added @webpack-cli/serve npm module * added webpack/serve to gitpod.yml * yarn.lock * add webpack-cli * remove yarn-based webpack deps * more removal * re-add rails g react:install
re #9502