preline icon indicating copy to clipboard operation
preline copied to clipboard

noUiSlider is not defined

Open allesan opened this issue 7 months ago • 1 comments

I'm having problem using Advanced Range Slider. I get Uncaught ReferenceError: noUiSlider is not defined s range-slider.mjs:8

I'm using vite.js and importing it like this import HSRangeSlider from '../node_modules/preline/dist/range-slider.mjs' import noUiSlider from '../node_modules/nouislider/dist/nouislider.mjs'; import '../node_modules/nouislider/dist/nouislider.css';

allesan avatar Jun 05 '25 06:06 allesan

try to use like:

import noUiSlider from 'nouislider';
window.noUiSlider = noUiSlider;

see https://preline.co/docs/frameworks.html

Ercilan avatar Jun 16 '25 05:06 Ercilan

@allesan Hi! If you’re still experiencing the issue, please don’t hesitate to reopen the ticket — we’ll be happy to take another look.

olegpix avatar Jul 10 '25 15:07 olegpix

This issue happens for me when using pnpm, but using npm I get no issue

garrettlove8 avatar Jul 23 '25 12:07 garrettlove8