I don't have any experience with TypeScript. So, I thought I'd try to run the examples. It seems to me that a soup to nuts installation and running guide would be helpful. I'm making notes to write this up, as I'm trying to figure it out. This is what I have thus far.
On Windows, I did the following:
As Admin in Powershell:
choco install nodejs-lts
Cmd.exe to check installation:
node -v
npm -v
Adding fleet:
npm install @fleet-sdk/core
Also updated npm:
npm install -g [email protected]
These are the prerequisites for creating a New Project > Typescript Console Application in Visual Studio.
On WSL Ubuntu on Windows, I did the following:
Install LTS, since the apt-get repo is too old
$ curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
$ sudo apt-get install nodejs
$ node --version
$ sudo npm install -g [email protected]
$ sudo npm install -g typescript
So, I then try doing some of the scripts in the tutorial and turn it to javascript:
$ tsc sample.ts
Them I get several errors that look like this:
../../../node_modules/@fleet-sdk/core/dist/esm/models/collections/collection.d.ts:1:56 - error TS2304: Cannot find name 'Iterable'.
scratch.ts:18:19 - error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.