Ok solution took some time, but the pain was worth the knowledge acquisition, imo.
Short answer:
If you’re on Windows 10, pay attention to Lesson 1, install WSL and learn to use it. Its worth it!
Long answer:
My OS is Windows 10, had never previously had problems with Eleventy or npm plugins. And yet this project’s plugins were causing weird hard-to-fix problems.
As it was, I already had WSL enabled (Windows Subsystem for Linux) with Debian as the OS, but discovered that I wasn’t properly using it
Went back to Lesson 1 & went through both the video and post to make sure I better understood it.
Video: https://www.youtube.com/watch?v=_fntjriRe48
Post: https://fatsackfails.com/posts/eleventy-windows/
Btw, there’s no need to use Hyper…the Linux-flavor terminal is sufficient. In my case, I got a Debian terminal (and right-clicked to change Defaults opacity to make it look slightly funkier )
In essence, the above loads a Linux subsystem onto your Windows, and provides you with a corresponding terminal that accesses that system, showing its different folder structure (eg. /home, /root, /bin etc).
You can see those files using Windows Explorer (eg. via \\wsl$\Debian
or \\wsl$\Ubuntu
), or open Explorer from the terminal by using the command Explorer.exe .
(note that the final dot opens to the pwd folder)
If you want to use Explorer rather than a terminal, you can download or move your files into your home directory (I created /home/projects/learn-eleventy-from-scratch
and loaded Lesson 22’s files into that).
Then CD to that folder in your terminal, and use command code .
to launch VS Code with the folder already loaded.
Almost done, but I first needed to load my node modules, so I referred back to the fatsackfails Post linked above and realized I had to:
- install curl
- install nvm
Cool, I was now able to install node + npm.
Lastly, I had to run npm update
to fix an issue with gulp-imagemin, which was giving me weird EPIPE error messages. The update fixed that.
In hindsight, I guess all that could be done in an hour or two (rather than the days of faffing around it took me because I didn’t know what I was doing). And while its just a file structure at this stage, if GUI applications are desired its easy to load the different Linux desktops, such as XCFE.
Anyway, end result is you get a Linux subsystem to work on within Windows, without having to dual boot. In my view, that’s a huge amount of quick & extra flexibility, so definitely worth the effort!