rgaufman PRO
Joined 4/19/2018
rgaufman PRO said over 1 year ago on Hotwire Modals :
Has the safari bug with the edit_project_path been fixed yet by Apple, or do we still need to do this workaround?

rgaufman PRO said 6 months ago on Deferred Content Loading :
I have this in my app/javascript/controllers/index.js:

import { Application } from '@hotwired/stimulus'
import ContentLoader from '@stimulus-components/content-loader'

const application = Application.start()
application.register('content-loader', ContentLoader)

const context = require.context("controllers", true, /_controller\.js$/)
application.load(definitionsFromContext(context))


When I try to do assets:precompile I get:

Compiling...
Compilation failed:
Hash: 6bc275dcedcd4bc36d87
Version: webpack 4.47.0
Time: 1906ms
Built at: 24/05/2024 16:27:09
 9 assets
Entrypoint application = js/application-e34da527d69634484861.js js/application-e34da527d69634484861.js.map
Entrypoint events/index = js/events/index-8b5f53b65bb3b11030a7.js js/events/index-8b5f53b65bb3b11030a7.js.map
[11] ./app/javascript/src/assets/images/icons/weather/wi-na.svg 126 bytes {2} [built]
...
[51] ./app/javascript/packs/application.js + 8 modules 139 KiB {1} [built]
     | ./app/javascript/packs/application.js 80 bytes [built]
     | ./app/javascript/controllers/index.js 439 bytes [built]
     |     + 7 hidden modules
    + 39 hidden modules

ERROR in ./node_modules/@stimulus-components/content-loader/dist/stimulus-content-loader.mjs 2:52-62
Can't import the named export 'Controller' from non EcmaScript module (only default export is available)
 @ ./app/javascript/controllers/index.js
 @ ./app/javascript/packs/application.js


$ egrep -i 'stimulus' package.json
    "@hotwired/stimulus": "^3.2.2",
    "@hotwired/stimulus-webpack-helpers": "^1.0.1",
    "@stimulus-components/content-loader": "^5.0.0",
$ egrep -i "\srails \(7" Gemfile.lock
    rails (7.0.8.3)


UPDATE: My issue was with webpacker, re-installing webpacker seems to have resolved it!

rgaufman PRO said 6 months ago on Deferred Content Loading :
My issue was indeed with webpacker. That's a good shout for Turbo and turbo_frame_tag, thank you for that!

rgaufman PRO said 6 months ago on Reloadable Fixtures :
Is there any advantage to using fixtures vs using factories with something like factory bot?

rgaufman PRO said 6 months ago on Previous/Next Record :
I'm getting this, any ideas?
$ rails action_text:install
rails aborted!
Don't know how to build task 'action_text:install' (See the list of available tasks with `rails --tasks`)
/Users/hackeron/Development/TetherX/tetherx/bin/rails:5:in `<top (required)>'
/Users/hackeron/Development/TetherX/tetherx/bin/spring:12:in `block in <top (required)>'
/Users/hackeron/Development/TetherX/tetherx/bin/spring:9:in `<top (required)>'
(See full trace by running task with --trace)
I have actiontext (7.0.8.3) installed in my Gemfile.lock.