When running:
npm run build
in my Next.js v13.4.19 app, I got this error for a couple of .tsx components:
Error: Parsing error: DeprecationError: 'originalKeywordKind' has been deprecated since v5.0.0 and can no longer be used. Use 'identifierToKeywordKind(identifier)' instead.
Google and ChatGPT did not help in any way, so I decided to delete these file and folders:
- package-lock.json
- /node_modules
- /.next
- /out
Then I ran:
npm install
And finally I could build my application again!