I am trying to update a Rails 3 app to Rails 6 and I have problems with the now default webpacker since my Javascript functions are not accessible.  I get: ReferenceError: Can't find variable: functionName for all js function triggers.  What I di...
I'm a bit stumped. My local rails app works great with webpacker 4.2 and react, but when deploying to production gives me the wonderful can't find application in /app/public/packs/manifest.json error.  Here's what I've tried:   Tried...
This a continuation of a related problem that @rossta fixed part of, but now the problem is moved so thought I'd start over.  No errors and the script is completing (verified by console.log outputs in the script). The body element shows up. This...
I'm trying to use the JS routes gem with webpacker from Rails 5.1 but can't figure out how to include the js-routes.js.erb in webpack's app/javascript/packs/application.js.  import 'js-routes'  leads to   Uncaught Error: Cannot fi...
With the arrival of Webpacker to Ruby On Rails I can't find a way to use my Javascript functions.  I have a file called app-globals.js with a function to test:  function alerts () {     alert ("TEST") }   Then I want to use it in one of m...
I'd like to specify config defaults that will be applied to every request:  // app/javascript/setupCSRFToken.js import axios from 'axios'  export default function() {   const csrfToken = document.querySelector("meta[name=csrf-token]&#...
/app/javascript/packs/application.js    contain this  require("main/jquery.min.js") require("main/jquery-ui.min.js")   javascript build on console shows like this  [./app/javascript/main/jquery-ui.min.js] 341 KiB {application} [built]...
[Edit] I realised this is due to an issue that is outside of React. Please ignore this question.  I am using React Context for my project. It works perfectly on my application on development environment with Webpacker but when I precompile my assets...
What is the current behavior?  Webpack returns error provided below when webpack is called both with cli and webpack function. Strange thing is that it started returning this error after reinstalling node modules.  If the current behavior is a bug, p...
I want to use the cropperjs and uppy in the rails,  so I refered to   https://github.com/shrinerb/shrine/wiki/Image-Cropping And sample codes  https://github.com/shrinerb/shrine-crop-example/ but Application.js failed to load, I got an error that loa...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.