How to Fix SyntaxError: Unexpected token { encountered when running `npm start`

ngl4

Cindy Lam

Posted on September 8, 2022

How to Fix SyntaxError: Unexpected token { encountered when running `npm start`

You may have already updated the node version to the latest LTS and then encountered this error.

This particular error is coming from the webpack-dev-server node module. In order to resolve this syntax error, you just need to update the version of your npm package to the latest version, as below:

npm install -g npm@latest
Enter fullscreen mode Exit fullscreen mode

If you need additional guidance on updating node/npm to latest version, read more here.

It is a really quick fix, but took me slightly longer than expected to figure out this issue. Hope this will help you out if you are going through the similar experience! p^v^q

💖 💪 🙅 🚩
ngl4
Cindy Lam

Posted on September 8, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

What is Website Localization?
webdev What is Website Localization?

November 25, 2024

How I Built My Portfolio Site
webdev How I Built My Portfolio Site

November 12, 2024

How to tackle your first Hacktober Fest
opensource How to tackle your first Hacktober Fest

November 5, 2024

Web Dev Buzzwords: CSR, SSR, SSG!
webdev Web Dev Buzzwords: CSR, SSR, SSG!

October 23, 2024