getting-started icon indicating copy to clipboard operation
getting-started copied to clipboard

SyntaxError: Unexpected token '.'

Open huan opened this issue 3 years ago • 11 comments

TL;DR: Update Node.js to version 16+

If you saw the following error messages:

SyntaxError: Unexpected token '.'
    at Loader.moduleStrategy (internal/modules/esm/translators.js:140:18)

Then please check the version of your Node.js:

node --version
  • ~~10~~
  • ~~12~~
  • 14
  • 16

If the version is below 14, then you need to upgrade Node.js to version 14 or above (16 is recommended).

Wechaty requires Node.js 14+ since version 0.69

huan avatar Sep 06 '21 08:09 huan

thanks mate! this was really helpful for me :9

holylander avatar Dec 01 '21 09:12 holylander

You are welcome!

huan avatar Dec 01 '21 12:12 huan

Thanks :)

OmerAtayilmaz avatar Feb 17 '23 17:02 OmerAtayilmaz

What if I already have Node version 16.15.0 but this error still exists?

kasm avatar Mar 27 '23 17:03 kasm

@kasm Did you find a solution?

Zadag avatar Apr 07 '23 10:04 Zadag

Has anyone found a solution for this? I'm running node 16.13.0 and still getting these errors.

mrpatrickwest avatar Aug 03 '23 19:08 mrpatrickwest

I am using v14.21.3 and facing same issue

manusharmaappfoster avatar Oct 12 '23 12:10 manusharmaappfoster

@manusharmaappfoster The easiest fix is updating to 16+

Zadag avatar Oct 12 '23 14:10 Zadag

If the bot stops and has got an address then how do we enter the mnemonic phrase?

dzekin22 avatar Dec 28 '23 10:12 dzekin22

I have the same problem,I want to use vs code in windows 7 so i should use node.js version 13.14.0. now when i want to use vite for creating app, it send this error to me. what can i do now? SyntaxError: Unexpected token '.' ←[90m at Loader.moduleStrategy (internal/modules/esm/translators.js:81:18)←[39m

Parnia-mohammadi avatar Apr 26 '24 12:04 Parnia-mohammadi