esbuild-sass-plugin icon indicating copy to clipboard operation
esbuild-sass-plugin copied to clipboard

Infinity loop on Windows when loading modules paths

Open jcoqueret opened this issue 1 year ago • 1 comments

Hi,

I am running the sass plugin version 3.3.1 on Windows. When executing my build, the process gets stuck in the plugin by a infinite loop inside the modulesPaths function.

The problem occurs because the path variable doesn't contain the ending '/' while the root variable does.

Here a simple project to reproduce the issue: esbuild-sass-plugin-issue.zip

And here is the output of that script:

Path: C:\temp\folder\subfolder\other-subfolder - Root: C:\
Path: C:\temp\folder\subfolder - Root: C:\
Path: C:\temp\folder - Root: C:\
Path: C:\temp - Root: C:\
Path: C: - Root: C:\
Path: C:\temp\folder\subfolder\other-subfolder - Root: C:\
Path: C:\temp\folder\subfolder - Root: C:\
Path: C:\temp\folder - Root: C:\
Path: C:\temp - Root: C:\
Path: C: - Root: C:\

jcoqueret avatar Oct 24 '24 08:10 jcoqueret

Hello @jcoqueret Thank you for your report.

I've run your code but didn't encounter the issue. This may happen on certain versions of Node.js. Could you please provide more information about your Node.js version and OS version?

Path: D:\temp\folder\subfolder\other-subfolder - Root: D:\
Path: D:\temp\folder\subfolder - Root: D:\
Path: D:\temp\folder - Root: D:\
Path: D:\temp - Root: D:\

Thanks!

dungjk avatar Oct 28 '24 02:10 dungjk

Hi, I was running the version 23.0.0 when I got that issue. I tried on version 23.1.0 and 22.11.0 and it looks all good.

Thank you to figure it out where the issue was. I'll close that issue.

jcoqueret avatar Oct 31 '24 16:10 jcoqueret