Troubleshooting

Some ideas to fix your code

There are some common mistakes you might run into when trying to get JavaScript code to work in Make. I'll list some of them here, but if you're still having problems join the Slack community and I'll help you to get the JavaScript code Make compatible.

Input Variables

Many errors occur if, for example, a JSON object is used in the input field, but you do not pass a valid JSON with correct quotation marks.

Valid JSON Object

{"firstName": "Henrik", "lastName": "Foo"}

Invalid JSON Object

{firstName: "Henrik", lastName: "Foo"}

Valid Quotes

"

Invalid Quotes

JS Code

Usually inline comments work as long as there are proper line breaks in the code. But if you have problems just remove them.

Correct return statement

const sum = x * y * input;
return sum;

No return statement

const sum = x * y * input;

Removed inline comments


return input.firstName + ' ' + input.lastName;

Inline Comments

// return full name
return input.firstName + ' ' + input.lastName;

Make Custom JavaScript Map & Reduce Example
?