You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I migrated from Algolia's client to Meilisearch. I am unable to build the project for production using vite build.
Current behavior
RollupError: node_modules/meilisearch/dist/bundles/meilisearch.esm.js (1:9): "createHmac" is not exported by "__vite-browser-external", imported by "node_modules/meilisearch/dist/bundles/meilisearch.esm.js".
Screenshots or Logs
vite v5.2.11 building for production...
[plugin:vite:resolve] [plugin vite:resolve] Module "crypto" has been externalized for browser compatibility, imported by "/Users/luke/dev/pos-vts/node_modules/meilisearch/dist/bundles/meilisearch.esm.js". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
✓ 244 modules transformed.
x Build failed in 559ms
error during build:
RollupError: node_modules/meilisearch/dist/bundles/meilisearch.esm.js (1:9): "createHmac" is not exported by "__vite-browser-external", imported by "node_modules/meilisearch/dist/bundles/meilisearch.esm.js".
file: /Users/luke/dev/pos-vts/node_modules/meilisearch/dist/bundles/meilisearch.esm.js:1:9
1: import { createHmac } from 'crypto';
^
2:
3: // Type definitions for meilisearch
at getRollupError (file:///Users/luke/dev/pos-vts/node_modules/rollup/dist/es/shared/parseAst.js:394:41)
at error (file:///Users/luke/dev/pos-vts/node_modules/rollup/dist/es/shared/parseAst.js:390:42)
at Module.error (file:///Users/luke/dev/pos-vts/node_modules/rollup/dist/es/shared/node-entry.js:13855:16)
at Module.traceVariable (file:///Users/luke/dev/pos-vts/node_modules/rollup/dist/es/shared/node-entry.js:14303:29)
at ModuleScope.findVariable (file:///Users/luke/dev/pos-vts/node_modules/rollup/dist/es/shared/node-entry.js:11984:39)
at FunctionScope.findVariable (file:///Users/luke/dev/pos-vts/node_modules/rollup/dist/es/shared/node-entry.js:7432:38)
at FunctionBodyScope.findVariable (file:///Users/luke/dev/pos-vts/node_modules/rollup/dist/es/shared/node-entry.js:7432:38)
at Identifier.bind (file:///Users/luke/dev/pos-vts/node_modules/rollup/dist/es/shared/node-entry.js:6908:40)
at CallExpression.bind (file:///Users/luke/dev/pos-vts/node_modules/rollup/dist/es/shared/node-entry.js:4775:23)
at CallExpression.bind (file:///Users/luke/dev/pos-vts/node_modules/rollup/dist/es/shared/node-entry.js:9135:15)
Environment (please complete the following information): (all latest versions)
vue-instantsearch@4.16.2
@meilisearch/instant-meilisearch@0.18.0
Vue 3 for a simple one page SPA
Node 22.0.0
Darwin Kernel Version 23.4.0 (Mac)
The text was updated successfully, but these errors were encountered:
flexchar
changed the title
Error "createHmac" is not exported by "__vite-browser-external", imported by "node_modules/meilisearch/dist/bundles/meilisearch.esm.js". when building for production
Error "createHmac" is not exported by "__vite-browser-external" when building for production
May 8, 2024
Description
I migrated from Algolia's client to Meilisearch. I am unable to build the project for production using
vite build
.Current behavior
Screenshots or Logs
Environment (please complete the following information): (all latest versions)
The text was updated successfully, but these errors were encountered: