htmlstreamofficial / preline

Preline UI is an open-source set of prebuilt UI components based on the utility-first Tailwind CSS framework.
https://preline.co
Other
4.9k stars 309 forks source link

`typeof typeof noUiSlider` causes `require is not defined` bug #476

Closed NikarashiHatsu closed 1 month ago

NikarashiHatsu commented 1 month ago

Summary

Double typeof keyword causes require is not defined bug

Steps to Reproduce

  1. Install Preline on a fresh Laravel project using this guide.
  2. Build the asset using npm run build or bun run build.
  3. See the error such as screenshot below:
Screenshot 2024-10-07 at 15 40 54 Screenshot 2024-10-07 at 15 41 02

My current workaround is downgrading to 2.4.0 or editing the package file to remove the extra typeof.

Please let me know if this is intended, or a typo, since I'm not an expert into JavaScript.

Demo Link

https://github.com/NikarashiHatsu/preline-typeof-bug

Expected Behavior

There are no require is not defined error on the console.

Actual Behavior

The error require is not defined is exists on compiled asset of Preline.

Screenshots

Screenshot 2024-10-07 at 15 40 54 Screenshot 2024-10-07 at 15 41 02

On line 50

Screenshot 2024-10-07 at 15 53 04
TheBous commented 1 month ago

same issue here

matteotumiati commented 1 month ago

There's PR #471 that should fix this, and we're waiting to get merged when 2.5.1 will be released 😄

NikarashiHatsu commented 1 month ago

@matteotumiati classic silly copy-paste predicament 😅

Sicklou commented 1 month ago

This issue completely broke my production. Hopefully the fix comes quick

andrew-vdb commented 1 month ago

losing hours of my life because of this issue (in the weekend with flue)... i'll wait 2.5.1 to be released...

rubenrcdev commented 1 month ago

3 weeks to merge a fix with one line change... Why a bug, that break the compilation and not allow to deploy it, that must be a priority fix, can be standby for a 3 weeks?

mstnorris commented 1 month ago

When is the v2.5.1 release due to go out?

jahaganiev commented 1 month ago

Hey everyone!

The v2.5.1 release with important fixes is now live. We sincerely apologize for the delay in rolling out this hotfix update.

Cheers!

michaelnabil230 commented 2 weeks ago

Hello @jahaganiev,

I've updated to v2.5.1, but I'm still encountering the same issue when running npm run build. However, everything works fine with npm run dev.

Any solution for this issue??

Screenshot 2024-11-08 at 1 13 19 AM