Esri / calcite-design-system

A monorepo containing the packages for Esri's Calcite Design System
https://developers.arcgis.com/calcite-design-system/
Other
268 stars 75 forks source link

Error during SSR #9242

Open feus4177 opened 1 month ago

feus4177 commented 1 month ago

Check existing issues

Actual Behavior

Throws an error during import.

Expected Behavior

No errors are thrown during import.

Reproduction Sample

SSR problem

Reproduction Steps

Setup a default vite 5.1 build with the following added to the vite config

  ssr: {
    noExternal: [
      '@esri/calcite-components',
      '@stencil/core',
    ],
  },

Reproduction Version

2.8.0

Relevant Info

MacOS

ReferenceError: navigator is not defined
    at getUserAgentData (./node_modules/.pnpm/@esri+calcite-components@2.8.0/node_modules/@esri/calcite-components/dist/components/src/utils/browser.ts:9:5)

Regression?

No response

Priority impact

p4 - not time sensitive

Impact

Unable to use calcite-components. Will probably have to use a different library.

Calcite package

Esri team

N/A

geospatialem commented 3 weeks ago

@feus4177 Can you supply a reproduction sample or a scaffolding command for us to diagnose further?

We're currently blocked by a Stencil issue, https://github.com/ionic-team/stencil/issues/4010, so we may be unable to mitigate depending on the instance.

geospatialem commented 6 days ago

@feus4177 Following up if you can supply us with a repro sample to diagnose further.