0

Why does this clasp command no longer work for me?

clasp run setProperty -p ['domain' 'mydomain.com']

which runs this function

function setProperty(key,value) { let scriptProperties = PropertiesService.getScriptProperties() scriptProperties.setProperty(key,value) }; 
PC:AppsScript-CLASP user$ clasp run setProperty -p ['domain' 'mydomain.com'] Input params not Valid JSON string. Please fix and try again 

Is this an issue with my system or the packages?

I'm using

  • Node v8.11.1
  • Clasp v2.3.0
  • MacOs BigSur v11.2.1
1
  • Unrelated to the JSON format, I was also using old versions of node. Updating to node lts helped. I also needed to update my .zshrc to work with nvm. Commented Feb 16, 2021 at 15:29

1 Answer 1

1

You forgot a comma and single quotes

As per the example in the documentation you must use single quotes outside the array and double quotes when using a string clasp run 'setProperty' -p '["domain", "mydomain.com"]'.

Reference

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the link, Jose! I wish the documentation included your simple example.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.