Skip to content
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

Console error: Can't find selectize #60

Open
andrewwise opened this issue Nov 15, 2024 · 8 comments
Open

Console error: Can't find selectize #60

andrewwise opened this issue Nov 15, 2024 · 8 comments

Comments

@andrewwise
Copy link

Getting the following error in my browser console:

Uncaught Error: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Can't find stylesheet to import.
   ╷
20 │ @import "selectize";
   │         ^^^^^^^^^^^
   ╵
  app/javascript/stylesheets/active_admin.scss 20:9  root stylesheet

Have I missed an install step?

The imports are included in app/javascript/stylesheets/active_admin.scss is that correct?

@import "selectize";
@import "selectize.default";
@import "activeadmin-ajax_filter";
@andrewwise
Copy link
Author

@holyketzer - Sorry to bother you, any ideas on this? 🙂

@holyketzer
Copy link
Owner

@andrewwise could share you Gemfile.lock?

@andrewwise
Copy link
Author

@holyketzer - Sure:

GEM
  remote: https://rubygems.org/
  specs:
    actioncable (7.0.8.4)
      actionpack (= 7.0.8.4)
      activesupport (= 7.0.8.4)
      nio4r (~> 2.0)
      websocket-driver (>= 0.6.1)
    actionmailbox (7.0.8.4)
      actionpack (= 7.0.8.4)
      activejob (= 7.0.8.4)
      activerecord (= 7.0.8.4)
      activestorage (= 7.0.8.4)
      activesupport (= 7.0.8.4)
      mail (>= 2.7.1)
      net-imap
      net-pop
      net-smtp
    actionmailer (7.0.8.4)
      actionpack (= 7.0.8.4)
      actionview (= 7.0.8.4)
      activejob (= 7.0.8.4)
      activesupport (= 7.0.8.4)
      mail (~> 2.5, >= 2.5.4)
      net-imap
      net-pop
      net-smtp
      rails-dom-testing (~> 2.0)
    actionpack (7.0.8.4)
      actionview (= 7.0.8.4)
      activesupport (= 7.0.8.4)
      rack (~> 2.0, >= 2.2.4)
      rack-test (>= 0.6.3)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.2.0)
    actiontext (7.0.8.4)
      actionpack (= 7.0.8.4)
      activerecord (= 7.0.8.4)
      activestorage (= 7.0.8.4)
      activesupport (= 7.0.8.4)
      globalid (>= 0.6.0)
      nokogiri (>= 1.8.5)
    actionview (7.0.8.4)
      activesupport (= 7.0.8.4)
      builder (~> 3.1)
      erubi (~> 1.4)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.1, >= 1.2.0)
    active_material (1.5.2)
    activeadmin (2.14.0)
      arbre (~> 1.2, >= 1.2.1)
      formtastic (>= 3.1, < 5.0)
      formtastic_i18n (~> 0.4)
      inherited_resources (~> 1.7)
      jquery-rails (~> 4.2)
      kaminari (~> 1.0, >= 1.2.1)
      railties (>= 6.1, < 7.1)
      ransack (>= 2.1.1, < 4)
    activeadmin-ajax_filter (0.7.0)
      activeadmin (>= 1.0)
      coffee-rails (>= 4.1.0)
      rails (>= 7.0)
      selectize-rails (>= 0.12.6)
    activeadmin_addons (1.10.1)
      active_material
      railties
      redcarpet
      require_all
      sassc
      sassc-rails
      xdan-datetimepicker-rails (~> 2.5.1)
    activejob (7.0.8.4)
      activesupport (= 7.0.8.4)
      globalid (>= 0.3.6)
    activejob-uniqueness (0.3.1)
      activejob (>= 4.2, < 7.2)
      redlock (>= 2.0, < 3)
    activemodel (7.0.8.4)
      activesupport (= 7.0.8.4)
    activemodel-serializers-xml (1.0.2)
      activemodel (> 5.x)
      activesupport (> 5.x)
      builder (~> 3.1)
    activerecord (7.0.8.4)
      activemodel (= 7.0.8.4)
      activesupport (= 7.0.8.4)
    activeresource (6.0.0)
      activemodel (>= 6.0)
      activemodel-serializers-xml (~> 1.0)
      activesupport (>= 6.0)
    activestorage (7.0.8.4)
      actionpack (= 7.0.8.4)
      activejob (= 7.0.8.4)
      activerecord (= 7.0.8.4)
      activesupport (= 7.0.8.4)
      marcel (~> 1.0)
      mini_mime (>= 1.1.0)
    activestorage-validator (0.1.5)
      rails (>= 5.2.0)
    activesupport (7.0.8.4)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (>= 1.6, < 2)
      minitest (>= 5.1)
      tzinfo (~> 2.0)
    addressable (2.8.6)
      public_suffix (>= 2.0.2, < 6.0)
    arbre (1.6.0)
      activesupport (>= 3.0.0, < 7.1)
      ruby2_keywords (>= 0.0.2, < 1.0)
    aws-eventstream (1.3.0)
    aws-partitions (1.952.0)
    aws-sdk-core (3.201.1)
      aws-eventstream (~> 1, >= 1.3.0)
      aws-partitions (~> 1, >= 1.651.0)
      aws-sigv4 (~> 1.8)
      jmespath (~> 1, >= 1.6.1)
    aws-sdk-kms (1.88.0)
      aws-sdk-core (~> 3, >= 3.201.0)
      aws-sigv4 (~> 1.5)
    aws-sdk-s3 (1.156.0)
      aws-sdk-core (~> 3, >= 3.201.0)
      aws-sdk-kms (~> 1)
      aws-sigv4 (~> 1.5)
    aws-sigv4 (1.8.0)
      aws-eventstream (~> 1, >= 1.0.2)
    base64 (0.2.0)
    bcrypt (3.1.20)
    bindex (0.8.1)
    bootsnap (1.18.3)
      msgpack (~> 1.2)
    browser_sniffer (2.2.1)
    builder (3.2.4)
    bullet (7.1.6)
      activesupport (>= 3.0.0)
      uniform_notifier (~> 1.11)
    byebug (11.1.3)
    capybara (3.40.0)
      addressable
      matrix
      mini_mime (>= 0.1.3)
      nokogiri (~> 1.11)
      rack (>= 1.6.0)
      rack-test (>= 0.6.3)
      regexp_parser (>= 1.5, < 3.0)
      xpath (~> 3.2)
    coderay (1.1.3)
    coffee-rails (5.0.0)
      coffee-script (>= 2.2.0)
      railties (>= 5.2.0)
    coffee-script (2.4.1)
      coffee-script-source
      execjs
    coffee-script-source (1.12.2)
    concurrent-ruby (1.3.1)
    connection_pool (2.4.1)
    content_disposition (1.0.0)
    crass (1.0.6)
    date (3.3.4)
    devise (4.9.4)
      bcrypt (~> 3.0)
      orm_adapter (~> 0.1)
      railties (>= 4.1.0)
      responders
      warden (~> 1.2.3)
    dotenv (2.8.1)
    dotenv-rails (2.8.1)
      dotenv (= 2.8.1)
      railties (>= 3.2)
    erubi (1.12.0)
    ethon (0.16.0)
      ffi (>= 1.15.0)
    execjs (2.10.0)
    faraday (2.7.11)
      base64
      faraday-net_http (>= 2.0, < 3.1)
      ruby2_keywords (>= 0.0.4)
    faraday-net_http (3.0.2)
    fastimage (2.3.1)
    ffi (1.16.3)
    formtastic (4.0.0)
      actionpack (>= 5.2.0)
    formtastic_i18n (0.7.0)
    globalid (1.2.1)
      activesupport (>= 6.1)
    graphql (2.1.0)
    graphql-client (0.18.0)
      activesupport (>= 3.0)
      graphql
    haml (6.1.2)
      temple (>= 0.8.2)
      thor
      tilt
    haml-rails (2.1.0)
      actionpack (>= 5.1)
      activesupport (>= 5.1)
      haml (>= 4.0.6)
      railties (>= 5.1)
    has_scope (0.8.1)
      actionpack (>= 5.2)
      activesupport (>= 5.2)
    hashie (5.0.0)
    i18n (1.14.5)
      concurrent-ruby (~> 1.0)
    image_processing (1.12.2)
      mini_magick (>= 4.9.5, < 5)
      ruby-vips (>= 2.0.17, < 3)
    inherited_resources (1.13.1)
      actionpack (>= 5.2, < 7.1)
      has_scope (~> 0.6)
      railties (>= 5.2, < 7.1)
      responders (>= 2, < 4)
    jbuilder (2.12.0)
      actionview (>= 5.0.0)
      activesupport (>= 5.0.0)
    jmespath (1.6.2)
    jquery-rails (4.6.0)
      rails-dom-testing (>= 1, < 3)
      railties (>= 4.2.0)
      thor (>= 0.14, < 2.0)
    jwt (2.7.1)
    kaminari (1.2.2)
      activesupport (>= 4.1.0)
      kaminari-actionview (= 1.2.2)
      kaminari-activerecord (= 1.2.2)
      kaminari-core (= 1.2.2)
    kaminari-actionview (1.2.2)
      actionview
      kaminari-core (= 1.2.2)
    kaminari-activerecord (1.2.2)
      activerecord
      kaminari-core (= 1.2.2)
    kaminari-core (1.2.2)
    klaviyo-api-sdk (7.1.0)
      retriable (~> 3.1)
      typhoeus (~> 1.0, >= 1.0.1)
    listen (3.9.0)
      rb-fsevent (~> 0.10, >= 0.10.3)
      rb-inotify (~> 0.9, >= 0.9.10)
    logger (1.6.0)
    loofah (2.22.0)
      crass (~> 1.0.2)
      nokogiri (>= 1.12.0)
    mail (2.8.1)
      mini_mime (>= 0.1.1)
      net-imap
      net-pop
      net-smtp
    marcel (1.0.2)
    matrix (0.4.2)
    method_source (1.0.0)
    mini_magick (4.12.0)
    mini_mime (1.1.5)
    minitest (5.23.1)
    msgpack (1.7.2)
    multi_xml (0.6.0)
    net-imap (0.4.10)
      date
      net-protocol
    net-pop (0.1.2)
      net-protocol
    net-protocol (0.2.2)
      timeout
    net-smtp (0.4.0.1)
      net-protocol
    nio4r (2.7.0)
    nokogiri (1.16.5-arm64-darwin)
      racc (~> 1.4)
    nokogiri (1.16.5-x86_64-linux)
      racc (~> 1.4)
    oauth2 (2.0.9)
      faraday (>= 0.17.3, < 3.0)
      jwt (>= 1.0, < 3.0)
      multi_xml (~> 0.5)
      rack (>= 1.2, < 4)
      snaky_hash (~> 2.0)
      version_gem (~> 1.1)
    omniauth (2.1.1)
      hashie (>= 3.4.6)
      rack (>= 2.2.3)
      rack-protection
    omniauth-oauth2 (1.8.0)
      oauth2 (>= 1.4, < 3)
      omniauth (~> 2.0)
    omniauth-rails_csrf_protection (1.0.1)
      actionpack (>= 4.2)
      omniauth (~> 2.0)
    omniauth-shopify-oauth2 (2.4.0)
      activesupport
      omniauth-oauth2 (~> 1.5)
    orm_adapter (0.5.0)
    pg (1.5.6)
    pry (0.14.2)
      coderay (~> 1.1)
      method_source (~> 1.0)
    pry-rails (0.3.9)
      pry (>= 0.10.4)
    pry-remote (0.1.8)
      pry (~> 0.9)
      slop (~> 3.0)
    public_suffix (5.0.4)
    puma (5.6.8)
      nio4r (~> 2.0)
    racc (1.8.0)
    rack (2.2.9)
    rack-protection (3.1.0)
      rack (~> 2.2, >= 2.2.4)
    rack-proxy (0.7.7)
      rack
    rack-test (2.1.0)
      rack (>= 1.3)
    rails (7.0.8.4)
      actioncable (= 7.0.8.4)
      actionmailbox (= 7.0.8.4)
      actionmailer (= 7.0.8.4)
      actionpack (= 7.0.8.4)
      actiontext (= 7.0.8.4)
      actionview (= 7.0.8.4)
      activejob (= 7.0.8.4)
      activemodel (= 7.0.8.4)
      activerecord (= 7.0.8.4)
      activestorage (= 7.0.8.4)
      activesupport (= 7.0.8.4)
      bundler (>= 1.15.0)
      railties (= 7.0.8.4)
    rails-dom-testing (2.2.0)
      activesupport (>= 5.0.0)
      minitest
      nokogiri (>= 1.6)
    rails-html-sanitizer (1.6.0)
      loofah (~> 2.21)
      nokogiri (~> 1.14)
    railties (7.0.8.4)
      actionpack (= 7.0.8.4)
      activesupport (= 7.0.8.4)
      method_source
      rake (>= 12.2)
      thor (~> 1.0)
      zeitwerk (~> 2.5)
    rake (13.2.1)
    ransack (3.2.1)
      activerecord (>= 6.1.5)
      activesupport (>= 6.1.5)
      i18n
    rb-fsevent (0.11.2)
    rb-inotify (0.10.1)
      ffi (~> 1.0)
    redcarpet (3.6.0)
    redirect_safely (1.0.0)
      activemodel
    redis (4.8.1)
    redis-client (0.22.1)
      connection_pool
    redlock (2.0.6)
      redis-client (>= 0.14.1, < 1.0.0)
    regexp_parser (2.9.0)
    require_all (3.0.0)
    responders (3.1.1)
      actionpack (>= 5.2)
      railties (>= 5.2)
    retriable (3.1.2)
    rexml (3.3.2)
      strscan
    rollbar (3.5.2)
    ruby-vips (2.1.4)
      ffi (~> 1.12)
    ruby2_keywords (0.0.5)
    rubyzip (2.3.2)
    sass-rails (6.0.0)
      sassc-rails (~> 2.1, >= 2.1.1)
    sassc (2.4.0)
      ffi (~> 1.9)
    sassc-rails (2.1.2)
      railties (>= 4.0.0)
      sassc (>= 2.0)
      sprockets (> 3.0)
      sprockets-rails
      tilt
    selectize-rails (0.12.6)
    selenium-webdriver (4.23.0)
      base64 (~> 0.2)
      logger (~> 1.4)
      rexml (~> 3.2, >= 3.2.5)
      rubyzip (>= 1.2.2, < 3.0)
      websocket (~> 1.0)
    semantic_range (3.0.0)
    shopify_api (9.5.1)
      activeresource (>= 4.1.0)
      graphql-client
      rack
    shopify_app (18.1.3)
      browser_sniffer (~> 2.0)
      jwt (>= 2.2.3)
      omniauth-rails_csrf_protection
      omniauth-shopify-oauth2 (~> 2.3)
      rails (> 5.2.1)
      redirect_safely (~> 1.0)
      shopify_api (~> 9.4)
    sidekiq (7.2.4)
      concurrent-ruby (< 2)
      connection_pool (>= 2.3.0)
      rack (>= 2.2.4)
      redis-client (>= 0.19.0)
    sidekiq-failures (1.0.4)
      sidekiq (>= 4.0.0)
    skylight (6.0.4)
      activesupport (>= 5.2.0)
    slop (3.6.0)
    snaky_hash (2.0.1)
      hashie
      version_gem (~> 1.1, >= 1.1.1)
    sprockets (4.2.1)
      concurrent-ruby (~> 1.0)
      rack (>= 2.2.4, < 4)
    sprockets-rails (3.4.2)
      actionpack (>= 5.2)
      activesupport (>= 5.2)
      sprockets (>= 3.0.0)
    strscan (3.1.0)
    temple (0.10.2)
    thor (1.3.1)
    tilt (2.3.0)
    timeout (0.4.1)
    turbolinks (5.2.1)
      turbolinks-source (~> 5.2)
    turbolinks-source (5.2.0)
    typhoeus (1.4.1)
      ethon (>= 0.9.0)
    tzinfo (2.0.6)
      concurrent-ruby (~> 1.0)
    uniform_notifier (1.16.0)
    version_gem (1.1.3)
    warden (1.2.9)
      rack (>= 2.0.9)
    web-console (4.2.1)
      actionview (>= 6.0.0)
      activemodel (>= 6.0.0)
      bindex (>= 0.4.0)
      railties (>= 6.0.0)
    webdrivers (5.2.0)
      nokogiri (~> 1.6)
      rubyzip (>= 1.3.0)
      selenium-webdriver (~> 4.0)
    webpacker (5.4.4)
      activesupport (>= 5.2)
      rack-proxy (>= 0.6.1)
      railties (>= 5.2)
      semantic_range (>= 2.3.0)
    websocket (1.2.11)
    websocket-driver (0.7.6)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.5)
    xdan-datetimepicker-rails (2.5.4)
      jquery-rails
      rails (>= 3.2.16)
    xpath (3.2.0)
      nokogiri (~> 1.8)
    zeitwerk (2.6.13)
    zip_kit (6.3.0)
    zip_tricks (5.6.0)
    zipline (2.0.0)
      actionpack (>= 6.0, < 8.0)
      content_disposition (~> 1.0)
      zip_kit (~> 6, >= 6.2.0, < 7)

PLATFORMS
  arm64-darwin-20
  arm64-darwin-21
  arm64-darwin-22
  arm64-darwin-23
  x86_64-linux

DEPENDENCIES
  activeadmin (~> 2.9)
  activeadmin-ajax_filter
  activeadmin_addons (~> 1.8)
  activejob-uniqueness
  activestorage-validator (~> 0.1.4)
  aws-sdk-s3
  bootsnap (>= 1.4.2)
  bullet
  byebug
  capybara (>= 2.15)
  devise (~> 4.8)
  dotenv-rails (~> 2.7)
  fastimage
  haml-rails (~> 2.0)
  image_processing (~> 1.2)
  jbuilder (~> 2.7)
  klaviyo-api-sdk
  listen (~> 3.2)
  pg (>= 0.18, < 2.0)
  pry-rails (~> 0.3.9)
  pry-remote
  puma (~> 5.6)
  rails (~> 7.0.0)
  redis (~> 4.0)
  rollbar
  rubyzip (>= 1.0.0)
  sass-rails (>= 6)
  selenium-webdriver
  shopify_app (~> 18)
  sidekiq (~> 7.1)
  sidekiq-failures
  skylight (~> 6.0)
  turbolinks (~> 5)
  tzinfo-data
  web-console (>= 3.3.0)
  webdrivers
  webpacker (~> 5.4.3)
  zip_tricks
  zipline

RUBY VERSION
   ruby 3.2.3p157

BUNDLED WITH
   2.4.6

@holyketzer
Copy link
Owner

Hmm, can't reproduce it you can check example https://github.com/holyketzer/activeadmin-ajax_filter/tree/master/test_app/blog

I used the same Ruby, Rails, activeadmin versions + added tubolinks gem

@andrewwise
Copy link
Author

Thanks for trying that out, really appreciate it. It must be something also specific about the activeadmin set up I have. I'm busy with something else currently but I'll try again next week.

@holyketzer
Copy link
Owner

holyketzer commented Nov 29, 2024

It's styles, but they important to make it work.

Try to comment next lines in active_admin.scss

// @import "selectize";
// @import "selectize.default";

It should show controls if selectize scripts are loaded ok, but they isn't functional:
Screenshot 2024-11-29 at 17 24 43

With styles it looks like:
Screenshot 2024-11-29 at 17 25 40

@holyketzer
Copy link
Owner

Also I'm not sure, just an idea, Rails 7 somehow supports NPM packages, probably it can conflicts with it (but I don't see jsbundling-rails in your gem file)

@holyketzer
Copy link
Owner

I tried to install jsbundling-rails with webpack and then esbuild engines it didn't affect anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants