Current main appears not to build?

AI-generated summary

The discussion revolves around an issue where the current main branch of a project fails to build locally, resulting in a ENOENT error related to a missing .js file for an .hbr template. merefield initially encountered the problem while using Node.js v20.x, which appears to be incompatible with the project. After switching back to Node.js v18.x (LTS Hydrogen), the build succeeded. simon confirmed that Ember CLI v5.0.0 is not tested with Node v20, referencing the official support documentation. To resolve the issue while still using Node v20 for other projects, simon used NVM to switch between Node versions, a solution merefield also found effective, particularly on WSL2.

When attempting to run a local dev instance, I’m getting this after bin/ember-cli -u:

- building...
Build Error (TemplateCompiler) in raw-templates/badge-selector-autocomplete.hbr

ENOENT: no such file or directory, open '/tmp/broccoli-155704EZeLMQlFLy1Y/out-0004-template_compiler/raw-templates/badge-selector-autocomplete.js

I could have somehow broken things locally, but this hasn’t occured before.

It’s expecting a js file to go along with an hbr file?! Why would it do that?

OK solved!

I was attempting to use latest version of node (20.x) as I’d been told 16.x was out of date.

when I switched back to lts/hydrogen (18.x) it built fine again.

Things clearly don’t work with node 20.x yet (for me!)

Lesson learnt. :mortar_board:

That’s good to know. I’ve been seeing this warning but ignoring it:

WARNING: Ember CLI v5.0.0 is not tested against Node v20.10.0. See "https://github.com/ember-cli/ember-cli/blob/master/docs/node-support.md" to find out which version of Node is best to use.

I need Node v20.10.0 for another app that’s running concurrently on my local machine. Installing NVM seems to have resolved the issue:

~/discourse$ nvm use 18.18.2

Yeah nvm was far more straightforward to use on WSL2 than n which had all kinds of permission issues …