ElMassimo / iles

🏝 The joyful site generator
https://iles.pages.dev
MIT License
1.08k stars 31 forks source link

Error on startup after project init #4

Closed enricobasso closed 2 years ago

enricobasso commented 2 years ago

Hi! Interesting project! I've tried to start a new project with npm init iles@next and after launching the dev server I got this error:

image

Working on Windows 10.

innocenzi commented 2 years ago

Just tested it on Windows 10, and I have the same issue. Probably comes from somewhere near that: https://github.com/ElMassimo/iles/blob/f67d4c68ec9807180280995a646c4a37323cd897/packages/iles/src/node/plugin/index.ts#L60

ElMassimo commented 2 years ago

Hi Enrico and Enzo, thanks for reporting!

There might be a few more of these bugs waiting in the codebase, I have not yet tested on Windows.

The error seems to occur here, which like Enzo mentioned, uses layoutsRoot.

Since there's a slash missing between the src dir and layouts, perhaps the bug has to do with the resolution here?

I'll take a look later today. Any help around how path resolution works in Windows is welcome! 😃

ElMassimo commented 2 years ago

@enricobasso @innocenzi Released iles@0.2.2, which uses pathe instead of the native path, and should prevent some incompatibilities.

Would appreciate it if you can try it and let me know if this fixes the path resolution 🙇

innocenzi commented 2 years ago

Hey, thanks, it works for me! At least the starter page shows up and I have no error. I'll play with Iles a bit and tell you if I encounter any other issue of this type.

enricobasso commented 2 years ago

Works fine for me too! Thank you.

ElMassimo commented 2 years ago

Excellent, thank you both for testing! 😃