Build Error: Non-Zero Exit | SyntaxError: Unexpected token '.'

Getting an error that I cannot pin down the proper solution for. The error given is

$ node ace build [2022-03-08 19:10:23] /workspace/node_modules/@poppinss/utils/build/src/Helpers/string.js:241 [2022-03-08 19:10:23] return ${values[0]}${options?.pairSeparator || ' and '}${values[1]}; [2022-03-08 19:10:23] ^ [2022-03-08 19:10:23] [2022-03-08 19:10:23] SyntaxError: Unexpected token ‘.’

I believe that this is due to an improper Node version from what I am able to tell, but after updating node, and updating yarn, I am still getting this same error on the build stage. Any idea’s on steps I can take to further troubleshoot / known solutions to this problem? I am a current Computer Science student, so please excuse my obvious ignorance in this matter as this is my first time using DigitalOcean.

Submit an answer
Answer a question...

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
March 9, 2022


Have you tried specifying your Node version?

You can do that by specifying the version in the engines directive of the package.json file as described here:

Let me know how it goes!