FYI, I’m having the same problem:
Question: are you sure you even need the package.json? I can’t find a definitive answer even to that question. I simply added the function in a /functions directory of my site, which does not have a package.json, and it gets deployed and “works” - aside from the import problem - without it. So, it’s unclear to me whether it’s even necessary or not. Surely we’re not supposed to check in node_modules at least I’m assuming, but without something looking for packages.json (which definitely isn’t needed just for a plain HTML site) then it won’t matter, and I can’t find anything that seems to be looking for it (and then executing an npm install as part of the build process, obviously).