Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError: Unexpected token '.' #204

Open
huan opened this issue Sep 6, 2021 · 11 comments
Open

SyntaxError: Unexpected token '.' #204

huan opened this issue Sep 6, 2021 · 11 comments
Labels

Comments

@huan
Copy link
Member

huan commented Sep 6, 2021

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 huan added the question label Sep 6, 2021
@holylander
Copy link

thanks mate! this was really helpful for me :9

@huan
Copy link
Member Author

huan commented Dec 1, 2021

You are welcome!

@OmerAtayilmaz
Copy link

Thanks :)

@kasm
Copy link

kasm commented Mar 27, 2023

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

@Zadag
Copy link

Zadag commented Apr 7, 2023

@kasm Did you find a solution?

@mrpatrickwest
Copy link

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

@manusharmaappfoster
Copy link

I am using v14.21.3
and facing same issue

@Zadag
Copy link

Zadag commented Oct 12, 2023

@manusharmaappfoster The easiest fix is updating to 16+

@dzekin22
Copy link

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

@Parnia-mohammadi
Copy link

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

@Mhdnoor06
Copy link

Did any of you find the solution, i tried upgrading to different versions like 16, 18, 20 the error message is same for all.

node:20596) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token '??='
at Loader.moduleStrategy (internal/modules/esm/translators.js:145:18)
(Use node --trace-warnings ... to show where the warning was created)
(node:20596) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:20596) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants