Notice there are different errors, which I resolved in #9897
Reproduction Version
@esri/calcite-components@v2.11.0-next.0
Relevant Info
The build errors you'll see from the repro steps:
failed Building production JavaScript and CSS bundles - 10.978s
ERROR #98124 WEBPACK.BUILD-JAVASCRIPT
Generating JavaScript bundles failed
undefined
If you're trying to use a package make sure that 'undefined' is installed. If you're trying to use a local file make sure that the path is correct.
File: node_modules/@esri/calcite-components/dist/components/ExpandToggle.js:6:0
The error above is repeated all (I think?) of the files in dist/components.
✘ [ERROR] Missing "./internal/client/index.js" specifier in "@stencil/core" package [plugin vite:dep-pre-bundle]
node_modules/@esri/calcite-components/dist/components/index.js:8:73:
8 │ export { getAssetPath, setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client/index.js';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This error came from the "onResolve" callback registered here:
node_modules/esbuild/lib/main.js:1150:20:
1150 │ let promise = setup({
╵ ^
at setup (file:///****/calcite-design-system-ssr-repro-9242/node_modules/vite/dist/node/chunks/dep-CzJTQ5q7.js:47463:13)
at handlePlugins (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:1150:21)
at buildOrContextImpl (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:873:5)
at Object.buildOrContext (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:699:5)
at /****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:2032:68
at new Promise (<anonymous>)
at Object.context (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:2032:27)
at Object.context (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:1874:58)
at prepareEsbuildOptimizerRun (file:///****/calcite-design-system-ssr-repro-9242/node_modules/vite/dist/node/chunks/dep-CzJTQ5q7.js:51405:33)
✘ [ERROR] Missing "./internal/client/index.js" specifier in "@stencil/core" package [plugin vite:dep-pre-bundle]
node_modules/@esri/calcite-components/dist/components/button.js:6:71:
6 │ import { proxyCustomElement, HTMLElement, forceUpdate, Build, h } from '@stencil/core/internal/client/index.js';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This error came from the "onResolve" callback registered here:
node_modules/esbuild/lib/main.js:1150:20:
1150 │ let promise = setup({
╵ ^
at setup (file:///****/calcite-design-system-ssr-repro-9242/node_modules/vite/dist/node/chunks/dep-CzJTQ5q7.js:47463:13)
at handlePlugins (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:1150:21)
at buildOrContextImpl (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:873:5)
at Object.buildOrContext (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:699:5)
at /****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:2032:68
at new Promise (<anonymous>)
at Object.context (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:2032:27)
at Object.context (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:1874:58)
at prepareEsbuildOptimizerRun (file:///****/calcite-design-system-ssr-repro-9242/node_modules/vite/dist/node/chunks/dep-CzJTQ5q7.js:51405:33)
✘ [ERROR] Missing "./internal/client/index.js" specifier in "@stencil/core" package [plugin vite:dep-pre-bundle]
node_modules/@esri/calcite-components/dist/components/loadable.js:6:35:
6 │ import { Build, forceUpdate } from '@stencil/core/internal/client/index.js';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This error came from the "onResolve" callback registered here:
node_modules/esbuild/lib/main.js:1150:20:
1150 │ let promise = setup({
╵ ^
at setup (file:///****/calcite-design-system-ssr-repro-9242/node_modules/vite/dist/node/chunks/dep-CzJTQ5q7.js:47463:13)
at handlePlugins (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:1150:21)
at buildOrContextImpl (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:873:5)
at Object.buildOrContext (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:699:5)
at /****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:2032:68
at new Promise (<anonymous>)
at Object.context (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:2032:27)
at Object.context (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:1874:58)
at prepareEsbuildOptimizerRun (file:///****/calcite-design-system-ssr-repro-9242/node_modules/vite/dist/node/chunks/dep-CzJTQ5q7.js:51405:33)
✘ [ERROR] Missing "./internal/client/index.js" specifier in "@stencil/core" package [plugin vite:dep-pre-bundle]
node_modules/@esri/calcite-components/dist/components/loader.js:6:57:
6 │ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client/index.js';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This error came from the "onResolve" callback registered here:
node_modules/esbuild/lib/main.js:1150:20:
1150 │ let promise = setup({
╵ ^
at setup (file:///****/calcite-design-system-ssr-repro-9242/node_modules/vite/dist/node/chunks/dep-CzJTQ5q7.js:47463:13)
at handlePlugins (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:1150:21)
at buildOrContextImpl (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:873:5)
at Object.buildOrContext (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:699:5)
at /****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:2032:68
at new Promise (<anonymous>)
at Object.context (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:2032:27)
at Object.context (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:1874:58)
at prepareEsbuildOptimizerRun (file:///****/calcite-design-system-ssr-repro-9242/node_modules/vite/dist/node/chunks/dep-CzJTQ5q7.js:51405:33)
✘ [ERROR] Missing "./internal/client/index.js" specifier in "@stencil/core" package [plugin vite:dep-pre-bundle]
node_modules/@esri/calcite-components/dist/components/icon.js:6:78:
6 │ import { getAssetPath, proxyCustomElement, HTMLElement, h, Host, Build } from '@stencil/core/internal/client/index.js';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This error came from the "onResolve" callback registered here:
node_modules/esbuild/lib/main.js:1150:20:
1150 │ let promise = setup({
╵ ^
at setup (file:///****/calcite-design-system-ssr-repro-9242/node_modules/vite/dist/node/chunks/dep-CzJTQ5q7.js:47463:13)
at handlePlugins (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:1150:21)
at buildOrContextImpl (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:873:5)
at Object.buildOrContext (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:699:5)
at /****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:2032:68
at new Promise (<anonymous>)
at Object.context (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:2032:27)
at Object.context (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:1874:58)
at prepareEsbuildOptimizerRun (file:///****/calcite-design-system-ssr-repro-9242/node_modules/vite/dist/node/chunks/dep-CzJTQ5q7.js:51405:33)
✘ [ERROR] Missing "./internal/client/index.js" specifier in "@stencil/core" package [plugin vite:dep-pre-bundle]
node_modules/@esri/calcite-components/dist/components/observers.js:6:22:
6 │ import { Build } from '@stencil/core/internal/client/index.js';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This error came from the "onResolve" callback registered here:
node_modules/esbuild/lib/main.js:1150:20:
1150 │ let promise = setup({
╵ ^
at setup (file:///****/calcite-design-system-ssr-repro-9242/node_modules/vite/dist/node/chunks/dep-CzJTQ5q7.js:47463:13)
at handlePlugins (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:1150:21)
at buildOrContextImpl (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:873:5)
at Object.buildOrContext (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:699:5)
at /****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:2032:68
at new Promise (<anonymous>)
at Object.context (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:2032:27)
at Object.context (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:1874:58)
at prepareEsbuildOptimizerRun (file:///****/calcite-design-system-ssr-repro-9242/node_modules/vite/dist/node/chunks/dep-CzJTQ5q7.js:51405:33)
✘ [ERROR] Missing "./internal/client/index.js" specifier in "@stencil/core" package [plugin vite:dep-pre-bundle]
node_modules/@esri/calcite-components/dist/components/interactive.js:6:25:
6 │ import { Build, h } from '@stencil/core/internal/client/index.js';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This error came from the "onResolve" callback registered here:
node_modules/esbuild/lib/main.js:1150:20:
1150 │ let promise = setup({
╵ ^
at setup (file:///****/calcite-design-system-ssr-repro-9242/node_modules/vite/dist/node/chunks/dep-CzJTQ5q7.js:47463:13)
at handlePlugins (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:1150:21)
at buildOrContextImpl (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:873:5)
at Object.buildOrContext (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:699:5)
at /****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:2032:68
at new Promise (<anonymous>)
at Object.context (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:2032:27)
at Object.context (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:1874:58)
at prepareEsbuildOptimizerRun (file:///****/calcite-design-system-ssr-repro-9242/node_modules/vite/dist/node/chunks/dep-CzJTQ5q7.js:51405:33)
✘ [ERROR] Missing "./internal/client/index.js" specifier in "@stencil/core" package [plugin vite:dep-pre-bundle]
node_modules/@esri/calcite-components/dist/components/form.js:6:18:
6 │ import { h } from '@stencil/core/internal/client/index.js';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This error came from the "onResolve" callback registered here:
node_modules/esbuild/lib/main.js:1150:20:
1150 │ let promise = setup({
╵ ^
at setup (file:///****/calcite-design-system-ssr-repro-9242/node_modules/vite/dist/node/chunks/dep-CzJTQ5q7.js:47463:13)
at handlePlugins (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:1150:21)
at buildOrContextImpl (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:873:5)
at Object.buildOrContext (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:699:5)
at /****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:2032:68
at new Promise (<anonymous>)
at Object.context (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:2032:27)
at Object.context (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:1874:58)
at prepareEsbuildOptimizerRun (file:///****/calcite-design-system-ssr-repro-9242/node_modules/vite/dist/node/chunks/dep-CzJTQ5q7.js:51405:33)
✘ [ERROR] Missing "./internal/client/index.js" specifier in "@stencil/core" package [plugin vite:dep-pre-bundle]
node_modules/@esri/calcite-components/dist/components/t9n.js:6:36:
6 │ import { Build, getAssetPath } from '@stencil/core/internal/client/index.js';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This error came from the "onResolve" callback registered here:
node_modules/esbuild/lib/main.js:1150:20:
1150 │ let promise = setup({
╵ ^
at setup (file:///****/calcite-design-system-ssr-repro-9242/node_modules/vite/dist/node/chunks/dep-CzJTQ5q7.js:47463:13)
at handlePlugins (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:1150:21)
at buildOrContextImpl (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:873:5)
at Object.buildOrContext (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:699:5)
at /****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:2032:68
at new Promise (<anonymous>)
at Object.context (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:2032:27)
at Object.context (/****/calcite-design-system-ssr-repro-9242/node_modules/esbuild/lib/main.js:1874:58)
at prepareEsbuildOptimizerRun (file:///****/calcite-design-system-ssr-repro-9242/node_modules/vite/dist/node/chunks/dep-CzJTQ5q7.js:51405:33)
Check existing issues
Actual Behavior
Some new build errors in SSR apps were introduced due to #9650.
Expected Behavior
No new build errors in SSR apps
Reproduction Sample
https://github.com/noahmulfinger/gatsby-calcite-components
Reproduction Steps
npm install @esri/calcite-components@v2.11.0-next.0
npm run build
npm install @esri/calcite-components@v2.10.2-next.2
Reproduction Version
@esri/calcite-components@v2.11.0-next.0
Relevant Info
The build errors you'll see from the repro steps:
The error above is repeated all (I think?) of the files in
dist/components
.The SvelteKit repro sample also has build errors:
Regression?
@esri/calcite-components@v2.10.2-next.2
Priority impact
impact - p1 - need for current milestone
Impact
No response
Calcite package
Esri team
Calcite (dev)