title: Cannot read property 'requestDevice' of null
body: <p>im trying to render web GPU shader object in WebGpu</p>
  <p>and it returning this error</p>
  <p><em><strong>Uncaught (in promise) TypeError: Cannot read property 'requestDevice' of null
  at cube.html:28</strong></em></p>
  <p>this is my code to the requestDevice</p>
  <pre><code>(async () =&gt; {
   
  
      const [adapter, glslang] = await Promise.all([
          navigator.gpu.requestAdapter(),
          import(&quot;https://unpkg.com/@webgpu/glslang@0.0.7/web/glslang.js&quot;).then(m =&gt; m.default())
      ]);
  
      const device = await adapter.requestDevice();
      
      const canvas = document.getElementById(&quot;webgpu-canvas&quot;);
      canvas.width = window.innerWidth;
      canvas.height = window.innerHeight;
  
  });
  </code></pre>
  <p>any idea to fix this error ??</p>