(TitleID 44B1)
Dear PlayFab community,
I am using TypeScript and Visual Studio Code with which to develop CloudScript functions for use with PlayFab. I also have GitHub integration activated on my account.
I committed some changes (no errors in VS Code or during the tsc execution), and PlayFab correctly got the latest version.
However, I'm showing no functions are available to execute. :-(
When I search the Forums for this issue, I see the following link:
https://community.playfab.com/questions/7823/this-revision-has-no-functions.html
And there is a hint that maybe I have the "wrong code syntax" somewhere? However, I'm not showing any obvious signs of incorrect syntax.
My tsconfig.json has the following:
{ "compilerOptions": { /* Basic Options */ "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'none', commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ "strict": true /* Enable all strict type-checking options. */ } }
I should mention that I changed the "target" from "es5" to "es6" to take advantage of the .find() method on collections:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find
I'm almost positive I saw the .find() method in an earlier CloudScript example, so I just assumed that it is supported by PlayFab. Maybe this is a bad assumption?
If I try to set the "target" back to "es5" and compile, I will get the following errors:
InventoryManagement.ts(66,16): error TS2339: Property 'find' does not exist on type 'CatalogItem[]'. InventoryManagement.ts(97,13): error TS2339: Property 'find' does not exist on type 'ItemInstance[]'.
How can I debug this issue to discover what's going on? There doesn't seem to be any information in the PlayStream at the time of upload, other than it was successful.
Thanks in advance for any help anyone can provide!