Search code examples
blazor.net-7.0

Getting 'import.meta' error when updating blazor app to dotnet 7


I have updated my code from dotnet 6 to dotnet 7. It builds and everything looks fine until i run it. Then i get the error message: Uncaught SyntaxError: Cannot use 'import.meta' outside a module (at dotnet.7.0.0.amub20uvka.js:8:27)

Any ideas?


Solution

  • According to this issue the problem is having some outdated packages as stated by @Mister Magoo. Updating WebAssembly did the trick for me.