-
Following
Sprockets::Rails::Helper::AssetNotPrecompiledError at /admin/things
Asset `flowbite/lib/cjs/index.js` was not declared to be precompiled in production.
Declare links to your assets in `app/assets/config/manifest.js`.
//= link flowbite/lib/cjs/index.js
and restart your server (which is weird because demo.activeadmin.info doesn't need this)
//= link flowbite/lib/cjs/index.js to
// assets/flowbite/lib/cjs/index.js
Object.defineProperty(exports, "__esModule", { // <= ReferenceError: Can't find variable: exports
value: true
});
Search suggests that I would appreciate any advice on this 🎩 BTW thanks for the great update! 🚀 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I had the same issue. In my case, it was because Rails.application.config.assets.paths << Rails.root.join('node_modules') After removing that line, it worked However, I didn't need that line for my application, so this can break something |
Beta Was this translation helpful? Give feedback.
-
@tagliala Thanks! It worked for us too 🙂 I tried to comment out |
Beta Was this translation helpful? Give feedback.
I had the same issue. In my case, it was because
config/initializers/assets.rb
containedAfter removing that line, it worked
However, I didn't need that line for my application, so this can break something