Alert example throws error: v3.0.3 & Stimulus v3.01
mrjonesbot opened this issue · comments
Can you click on that line in Stimulus.js and share what that is? Curious where it's falling over inside Stimulus. Looks to be the classes API.
According to the docs, we're using that properly? https://stimulus.hotwired.dev/reference/css-classes#properties
Ah, so maybe its undefined
or null
instead of an empty array?
Hmm, I guess can you stick a console.log() in the node_modules and see if it's not an array for your example?
Ok so, I updated my references and received a fun new error.
app/javascript/controllers/index.js
// Load all the controllers within this directory and all subdirectories.
// Controller files must be named *_controller.js.
import { Application } from "@hotwired/stimulus"
import { definitionsFromContext } from "@hotwired/stimulus-webpack-helpers"
import { Autocomplete } from 'stimulus-autocomplete'
const application = Application.start()
const context = require.context("controllers", true, /_controller\.js$/)
application.load(definitionsFromContext(context))
application.register('autocomplete', Autocomplete)
import { Alert, Dropdown, Modal, Tabs, Popover, Toggle, Slideover } from "tailwindcss-stimulus-components"
application.register('alert', Alert)
application.register('dropdown', Dropdown)
application.register('modal', Modal)
application.register('tabs', Tabs)
application.register('popover', Popover)
application.register('toggle', Toggle)
application.register('slideover', Slideover)
import Flatpickr from 'stimulus-flatpickr'
application.register('flatpickr', Flatpickr)
import StimulusReflex from 'stimulus_reflex'
import consumer from '../channels/consumer'
import controller from './application_controller'
StimulusReflex.initialize(application, { consumer, controller, debug: false })
Ok it actually looks like my install of StimulusReflex is causing issues with my controllers, since I'm in the process of ripping it out anyways, I'm going to do that and circle back.