Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

188
Views
Unexpected Token '.' on raspberry pi even though script runs fine on windows

I am encountering an error when I go to start one of my Discord bots on my Raspberry Pi 3B.

/home/pi/Downloads/xx/xx/bot.js:301
  if (channel?.messages.cache.has(packet.d.message_id)) return;
              ^

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47

When running the same bot on my main Windows 11 Machine, it runs perfectly fine.

NodeJS/NPM on both my main machine and my R-Pi are running v16.15.1. Is there any way I could fix this? Thank you in advance.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

As mentioned on the nodejs.org website, you can install the latest versions with the NodeSource deb package:

curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
# and then
sudo apt-get install -y nodejs

The default packages on your system are not up-to-date. Good day

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!