I’m getting this dev build error on two systems on current main
Module not found: Error: Can't resolve '@ember/debug' in '/home/robert/discourse/app/assets/javascripts/node_modules/ember-tracked-storage-polyfill/addon/index.js'
This may fox some people so I’m posting here.
Unusually you apppear to need to delete the node_modules directory deep in the Discourse directory structure:
node_modules
rm -r app/assets/javascripts/node_modules
After that, the error should disappear.