Uncaught ReferenceError: nameof is not defined
at eval (webpack-internal:///./src/components/Pages/Pages.tsx:36)
at Object../src/components/Pages/Pages.tsx (bundle.min.app.f52422b76f41c59b99cb.js:15146)
at __webpack_require__ (bundle.min.app.f52422b76f41c59b99cb.js:23364)
...
As it turns out, the line in bundle.min.app.f52422b76f41c59b99cb.js mentioned in the error contains calls to the function nameof which is indeed not defined anywhere. This seems to happen since Typescript 4.3, at least in my setup: Looking at the minified bundle using the older TS-version 4.2.4, I cannot find such a call, hence everything works fine.
I got the same issue "nameof is not defined".
"typescript": "^4.3.4",
"ts-nameof": "^4.2.2",
"@types/ts-nameof": "^4.2.1",
"ttypescript": "^1.5.12"
Setup mentioned here.
Some relevant dependencies used:
Relevant parts of webpack-config:
I get the following error at runtime:
As it turns out, the line in bundle.min.app.f52422b76f41c59b99cb.js mentioned in the error contains calls to the function
nameof
which is indeed not defined anywhere. This seems to happen since Typescript 4.3, at least in my setup: Looking at the minified bundle using the older TS-version 4.2.4, I cannot find such a call, hence everything works fine.Any help is appreciated! 🙏🏻