rowyio / rowy

Low-code backend platform. Manage database on spreadsheet-like UI and build cloud functions workflows in JS/TS, all in your browser.
http://rowy.io
Other
5.88k stars 479 forks source link

Failed deployment for dynamic default value for a column #1532

Open jyotman opened 6 months ago

jyotman commented 6 months ago

Describe the bug I keep getting this error when I try to set a dynamic value for any column in any table from managed Rowy. After I try to deploy the build, the build always fails with the following error. My dynamic function is really simple, just using return Date.now(), no use of any crypto package anywhere.

27
10:50:40:40  stdout: {"error":{"code":2,"killed":false,"signal":null,"cmd":"cd build/functionBuilder/builds/1706583003150/src;tsc functionConfig.ts"},"stdout":"../node_modules/@types/node/ts4.8/crypto.d.ts(4477,13): error TS2403: Subsequent variable declarations must have the same type.  Variable 'crypto' must be of type 'Crypto', but here has type 'Crypto'.
","stderr":""}

28
10:50:40:40  ../node_modules/@types/node/ts4.8/crypto.d.ts(4477,13): error TS2403: Subsequent variable declarations must have the same type.  Variable 'crypto' must be of type 'Crypto', but here has type 'Crypto'.

29
10:50:40:40  

command: cd build/functionBuilder/builds/1706583003150/src;tsc functionConfig.ts

description: Invalid compiled functionConfig.ts

To Reproduce Steps to reproduce the behavior:

  1. Go to column config of any number column.
  2. Set Default value type as "Dynamic"
  3. Set the code to
    
    const defaultValue: DefaultValue = () => {
    return Date.now()
    };

export default defaultValue;



5. Click update and then deploy.

**Expected behavior**
The dynamic function is supposed to assign a default value to my column when I create a new row. Instead nothing happens as the deployment of the cloud function fails.

**Rowy Run version**
Latest managed service

**Desktop (please complete the following information):**
 - OS: Mac 14.2.1 (23C71)
 - Browser - Chrome latest
eldadcaspi commented 6 months ago

Same here, cannot deploy changes. I tested on a new project and even a whole new workspace (Pro), same 'Crypto' should have been 'Crypto'(?!) type error. Starter around Jan 30-ish.

paulVu commented 5 months ago

I have the same issue when I deploy new function in derivative

Executing: cd build/functionBuilder/builds/1709100412605/src;tsc functionConfig.ts

27
13:07:33:33  stdout: {"error":{"code":2,"killed":false,"signal":null,"cmd":"cd build/functionBuilder/builds/1709100412605/src;tsc functionConfig.ts"},"stdout":"../node_modules/@types/node/ts4.8/events.d.ts(111,43): error TS2370: A rest parameter must be of an array type.
","stderr":""}

28
13:07:33:33  ../node_modules/@types/node/ts4.8/events.d.ts(111,43): error TS2370: A rest parameter must be of an array type.