Report this

What is the reason for this report?

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

Posted on March 8, 2022

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.



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!

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.

Hello,

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:

https://docs.digitalocean.com/products/app-platform/languages-frameworks/nodejs/#node-version

Let me know how it goes!

Best,

Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.