All Questions
Tagged with webpack ruby-on-rails
787
questions
0
votes
0
answers
42
views
Make Shakapacker ES6 functions available in inline Rails views
Rails version: 6.1.3
I am upgrading from Webpacker 5.2 to Shakapacker 7.2.2, and my ES6 functions defined globally on the window object are not available in inline script tags on an ERB view. My ...
1
vote
0
answers
20
views
Trying to deploy fullstack RoR app to heroku but has blank frontend
I have a Ruby on Rails, Node, react redux app I'm trying to deploy to heroku. I've worked my way through the deployment stage, and gotten it successfully hosted however it results in a blank frontend. ...
0
votes
0
answers
98
views
Rails Shakapacker webpack builds produces different runtime-hash.js files on different environments
I'm building the rails assets using bundle exec rails assets:precompile in two environments, 1 - in docker, and 2 - in gitlab ci. The goal here is to serve the static assets out through cloudfront/s3 ...
0
votes
1
answer
128
views
Rails Action Cable: ArgumentError in MessagesController#create - Wrong Number of Arguments (given 1, expected 2), error in Rails7
I'm working on a Ruby on Rails application with Action Cable for real-time messaging. I've encountered an error in my MessagesController that I can't seem to resolve. Here are the details:
Error ...
0
votes
0
answers
78
views
Upgrading Ruby - asset pipeline misconfigured
I'm in the process of upgrading Ruby versions for my company, going from 2.7.6 to 3.2.2. Our app uses Rails 6.1.3 and webpacker 6.0.0. I know the webpacker gem is deprecated and we're supposed to use ...
1
vote
0
answers
186
views
Webpacker configuration issues in rails app
I would like to request for your assistance.
I'm creating a rails app and I'm having issues with the webpacker
My webpack configuration is creating an empty manifest.json
I've tried for 2 days ...
0
votes
1
answer
420
views
Rails `webpack-dev-server` runs with an error "Module parse failed: Unexpected token. You may need an appropriate loader to handle this file type"
I have rails 6.1.7.5, webpacker 5 gem, and webpack 4. When I run ./bin/webpack-dev-server, it eventually shows this error:
ERROR in ./node_modules/@shopify/draggable/build/esm/shared/utils/closest/...
0
votes
0
answers
66
views
Webpacker won't seem to boot on an https port
I am using Shakapacker, a fork and successor to Webpacker, trying to get it to boot on https for local development, using a nonstandard domain abc.localhost.
This works for Puma by passing it a flag -...
0
votes
0
answers
83
views
Module not found: Error: Can't resolve '../types/utils' in '/my-app/node_modules/svelvet/Edges'
I've been trying to get this to work for the last 30 hours with no luck, I have a Rails 6 app with Svelte 3, React 18, Node 18 using Shakapacker 6, when I try to compile I'm getting this error:
ERROR ...
0
votes
0
answers
334
views
Yarn build failing because of babel plugin "Error: Cannot find package '@babel/plugin-preset-plugin-proposal-class-properties'"
I'm working on a rails 7 app that uses yarn. I've been trying for several hours to debug an issue during the built process without luck.
When I call yarn build, the build fails with:
yarn run v1.22.19
...
0
votes
0
answers
209
views
How to embed javascript(react) component using webpack(webpacker/shakapacker) on another webpage
I want to implement a simple chat component written in react in rails 6 application.
My idea is to put js link on another webpage on which my chat will be rendered.
Basically, I follow gorails.com ...
0
votes
2
answers
141
views
Webpack cannot find sass-loader provided by @rails/webpacker
When I try to import an scss file in my Vue component:
import './my_scss_file.scss';
I get an error that says:
Module not found: Error: Can't resolve 'sass-loader'
// ...
[/home/app/node_modules]
[/...
1
vote
0
answers
174
views
Importmaps in rails 7
I am new to rails 7 and dont know where to put my custom js files.
Now I know the importmaps are used to get third part javascript libraries via cdn's and we include in our application.js file. But ...
1
vote
1
answer
218
views
Forced to run assets:precompile two times to get the webpack builds copied to public directory
after long list of issues with rails/webpack there is a last one that hard to understand to fix properly.
I use:
rails with jsbundling-rails and sprockets-rails
webpack
yarn (switched from npm ...
1
vote
0
answers
74
views
A new entrypoint in the `@emotion/styled` package, `@emotion/styled/base`, has replaced the `@emotion/styled-base` package
I am getting the following error and am using the following npm packages,
"react": "^18.2.0",
"@emotion/react": "^11.1.3",
"@emotion/styled": "...