plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.


Please take a moment to read the platform’s guidelines before you get started!


question

OzWookiee avatar image
OzWookiee asked dga commented

MSFS Avionics Framework will not compile

Following the documentation here: https://microsoft.github.io/msfs-avionics-mirror/docs/getting-started/setting-up-your-environment a user in a fresh environment will get the following errors:

> msfssdk@0.1.0 build
> tsc

utils/DebounceTimer.ts:5:18 - error TS2503: Cannot find namespace 'NodeJS'.

5   private timer: NodeJS.Timeout | null = null;
                   ~~~~~
Found 1 error.

This is because it is missing the types library and section from the `tsconfig.json`

The user must first:

 npm install @types/node

and then edit the tsconfig.json file adding the following to the `compilerOptions`:

"types": [
      "node"
    ]

Once this is done, the SDK will compile

1644903423263.png

defaultgauges
1644903423263.png (2.9 KiB)
4 comments
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Build process also does not include the package.json file and so user trying to integrate into project will get the following error:

1644903700642.png

0 Likes 0 ·
Manually copying this file from the sdk folder allows this to then be used in other projects. Build process needs to be updated (assuming)

0 Likes 0 ·

Following on from this, using the tutorial to make our first component: https://microsoft.github.io/msfs-avionics-mirror/docs/getting-started/creating-your-first-component
This also suffers from errors, which I can only assume extends from the initial build failures.

1644963838761.png

0 Likes 0 ·
1644963838761.png (69.1 KiB)
StevenPearce avatar image
StevenPearce answered dga commented

I didn't even know this thing existed; looks great and very useful. Should be linked more prominently from the main documentation page.

3 comments
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Since late December, the Avionics Framework that was developed alongside the NXI is open source and regularly mirrored on GitHub: https://github.com/microsoft/msfs-avionics-mirror
It will receive more content and updates to the Framework with every public snapshot from our Repo. This usually happens alongside updates to Avionics (like the NXI).

With it comes some documentation: https://microsoft.github.io/msfs-avionics-mirror/docs/framework/

The MSFS team hopes that providing patterns and utilities with the Framework and the Avionics using it (as great examples) helps jumpstart other developers that want to get into this.

We are in talks on where to place this Framework in the landscape and make it better known, when its ripe for a bigger audience.

2 Likes 2 ·
Is the Proline 21 in the next release?
0 Likes 0 ·
dga avatar image dga StevenPearce ·
It will be on there, when it releases ;)
1 Like 1 ·
dga avatar image
dga answered OzWookiee commented

Hi @OzWookiee

Thanks for reporting the issues and workarounds you found, running through the tutorial.
These are problems that happen starting from a clean environment. Our dev environment already inherited these missing dependencies, so we didn't catch it early on. Sorry.

This will be corrected when the GitHub mirror receives the next public snapshot, which will happen very soon.

Regards,
Dominik

1 comment
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Thanks @dga just want to help make it better ;)
1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.