That tutorial is intended for someone to run the code locally (localhost using IIS, Linux, etc)
You’re trying to do it on codepen. Codepen isn’t a web server. It’s a framed environment to allow for quick and easy mockups of static use sites but it doesn’t work like a standard web server (or a browser for that matter) because everythings in frames and has to be interpreted separately.
I don’t use firebase, and I’ve certainly never tried to incorporate it into a codepen. Do a search for firebase on codepen and you’ll see a number of examples which use firebase, and see if any of them use the import functionality and see how they’re set up.
At the very least, you’ll need to add it to the page settings