Open joccing opened 4 years ago
Hi Clasp Developer,
May i know if there is a solution to this problem? or is it expected behaviour.
I'm getting the same error with the production version. When it's a string it returns 0
when it's int it returns No Response.
But when I build with npm run build
after uninstalling it globally it returns the correct response (haven't investigated yet).
$ clasp run testStrInt
(node:48234) ExperimentalWarning: The fs.promises API is experimental
Running in dev mode.
0
$ clasp run testInt
(node:48232) ExperimentalWarning: The fs.promises API is experimental
Running in dev mode.
No response.
Node version: v10.10.0
Clasp version: 2.3.0
function that you run is not return anything. if your function return something it will print on your terminal.
Expected Behavior
When running an Apps Script function, clasp run should return whatever the function returns.
Actual Behavior
When the function returns a 0, clasp run returns 'No response', and the correct output at other values. To force the 0 to be returned, you need to return the type cast String(output).
Steps to Reproduce the Problem
function test() { return 0; }
do clasp run test No response.
Change to
function test() { return 1; }
do clasp run test 1
Change to
function test() { return String(0); }
Specifications
node -v
): 13.8.0clasp -v
): 2.3.0