title: The requested module '@azure/arm-authorization' is expected to be of type CommonJS
body: <p>I am using Node 14.5.0 with a default Express.JS installation. I need to leverage the Azure SDK for Node using Imports and have changed the default express require from:</p>
  <pre><code>const express = require('express')
  </code></pre>
  <p>to:</p>
  <pre><code>import express from 'express';
  </code></pre>
  <p>Express is able to load, but when I add the example SDK for authorization (<a href="https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/authorization/arm-authorization" rel="nofollow noreferrer">https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/authorization/arm-authorization</a>) it is throwing the following error:</p>
  <blockquote>
  <p>import { AuthorizationManagementClient, AuthorizationManagementModels,
  AuthorizationManagementMappers } from &quot;@azure/arm-authorization&quot;;
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: The requested module '@azure/arm-authorization' is expected to be of type CommonJS,
  which does not support named exports. CommonJS modules can be imported
  by importing the default export. For example: import pkg from
  '@azure/arm-authorization'; const { AuthorizationManagementClient,
  AuthorizationManagementModels, AuthorizationManagementMappers } = pkg;
  at ModuleJob._instantiate (internal/modules/esm/module_job.js:98:21)
  at async ModuleJob.run (internal/modules/esm/module_job.js:137:5)
  at async Loader.import (internal/modules/esm/loader.js:162:24)</p>
  </blockquote>
  <p>I have already added &quot;type&quot;: &quot;module&quot;, to my package.json and installed the modules listed in the Azure SDK page.</p>
  <p>My App.JS page is as follows:</p>
  <pre><code>import express from 'express';
  import * as msRest from &quot;@azure/ms-rest-js&quot;;
  import * as msRestAzure from &quot;@azure/ms-rest-azure-js&quot;;
  import * as msRestNodeAuth from &quot;@azure/ms-rest-nodeauth&quot;;
  import { AuthorizationManagementClient, AuthorizationManagementModels, AuthorizationManagementMappers } from &quot;@azure/arm-authorization&quot;;
  const subscriptionId = process.env[&quot;myguideforsubhere&quot;];
  const app = express()
  const port = 5000
  
  app.get('/', (req, res) =&gt; res.send('Hello World!'))
  
  app.listen(port, () =&gt; console.log(`Example app listening at http://localhost:${port}`))
  
  msRestNodeAuth.interactiveLogin().then((creds) =&gt; {
      const client = new AuthorizationManagementClient(creds, subscriptionId);
      client.classicAdministrators.list().then((result) =&gt; {
        console.log(&quot;The result is:&quot;);
        console.log(result);
      });
    }).catch((err) =&gt; {
      console.error(err);
    });
  </code></pre>
  <p>My Package.json is as follows:</p>
  <pre><code>{
    &quot;name&quot;: &quot;myproject&quot;,
    &quot;version&quot;: &quot;1.0.0&quot;,
    &quot;description&quot;: &quot;myproject&quot;,
    &quot;main&quot;: &quot;app.js&quot;,
    &quot;scripts&quot;: {
      &quot;test&quot;: &quot;echo \&quot;Error: no test specified\&quot; &amp;&amp; exit 1&quot;
    },
    &quot;author&quot;: &quot;Me&quot;,
    &quot;license&quot;: &quot;ISC&quot;,
    &quot;dependencies&quot;: {
      &quot;@azure/arm-authorization&quot;: &quot;^8.3.2&quot;,
      &quot;@azure/ms-rest-nodeauth&quot;: &quot;^3.0.5&quot;,
      &quot;express&quot;: &quot;^4.17.1&quot;
    },
    &quot;type&quot;: &quot;module&quot;
  }
  </code></pre>
  <p>Does this look like an error in the SDK documentation where it can't use the imports as exampled but needs to be changed to require, or more likely, what have I done wrong?</p>