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

123
Views
Optional chaining in Azure function with node 14.18.3

I'm getting syntax errors with optional chaining while running an Azure function locally. Using Azure Functions Core Tools 4.0.3971 & Node 14.18.3:

Worker was unable to load function foo: 'SyntaxError: Invalid or unexpected token'

It points to the dot in the optional chaining code as if the syntax is not supported: variable?.prop

I have Node 14.18.3 installed on my machine, which I understand should support this. Wondering if there is something I could be missing in terms of telling the Azure function to use that Node version?

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

0

I would say is a syntax error in your code. I believe this happened to me before, and it is nothing on AFCT nor the AF configuration.

I believe it happened that I did a require wrongly or something along those lines.

Perhaps running eslint on it will help.

about 4 years ago · Juan Pablo Isaza Report

0

This turned out to be another module (CJS) causing the syntax error when trying to include the optional chaining.

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!