Outlook add-in accessing npm installed office-js library should work if internet is blocked
Office-js library gives error when add-in is loaded.


Client is using outlook add-in which uses office-js library for locale de_CH. Internet is blocked is workstation. On loading add-in it gives error as attached above.
This add-in is for both online and offline clients and this issue makes it useless for offline clients.
I have some questions that will help us reproduce this issue.
What is the version number of the Outlook client that has this issue?
Does this issue also occur when you load the office-js files from your web server (not the Office.js CDN), when internet access is enabled?
Are you able to reproduce the issue on other machines?
Here is the requested information:
Outlook version:

This issue does not occur when office-js files are loaded from web server and internet access is enabled.
And this issue is re-producible on multiple machines.
It seems like office-js library is trying to access Ajax library https://ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js which is blocked.
In general, self-hosting these files for Outlook, is not supported. The documentation for the NPM package should be updated with this information. That being said, you could try loading a self-hosted copy of Microsoft Ajax BEFORE Loading the Office.JS file to see if that works...
Most helpful comment
In general, self-hosting these files for Outlook, is not supported. The documentation for the NPM package should be updated with this information. That being said, you could try loading a self-hosted copy of Microsoft Ajax BEFORE Loading the Office.JS file to see if that works...