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
I tried to fix it with: "import fs from 'node:fs';" in "vite.config.ts", but it did not help. Any ideas how to fix this? Thanks!
`$ npm run build
ask-my-pdf@0.2.1 build
tsc && vite build
plugin 'html-plugin' uses deprecated 'enforce' option. Use 'order' option instead.
plugin 'html-plugin' uses deprecated 'transform' option. Use 'handler' option instead.
vite v5.2.11 building for production...
[plugin:vite:resolve] [plugin vite:resolve] Module "crypto" has been externalized for browser compatibility, imported by "/home/foo/dev/ask-my-pdf/node_modules/@nico-martin/tvmjs/lib/index.js". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
[plugin:vite:resolve] [plugin vite:resolve] Module "perf_hooks" has been externalized for browser compatibility, imported by "/home/foo/dev/ask-my-pdf/node_modules/@nico-martin/tvmjs/lib/index.js". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
✓ 79 modules transformed.
x Build failed in 1.31s
error during build:
Error: [vite-plugin-pwa:build] Failed to resolve entry for package "fs". The package may have incorrect main/module/exports specified in its package.json.
file: /home/foo/dev/ask-my-pdf/src/store/llm/LlmContextProvider.tsx
at packageEntryFailure (file:///home/foo/dev/ask-my-pdf/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:48264:17)
at resolvePackageEntry (file:///home/foo/dev/ask-my-pdf/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:48261:5)
at tryNodeResolve (file:///home/foo/dev/ask-my-pdf/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:48031:20)
at Object.resolveId (file:///home/foo/dev/ask-my-pdf/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:47781:28)
at file:///home/foo/dev/ask-my-pdf/node_modules/rollup/dist/es/shared/node-entry.js:19778:40
at async PluginDriver.hookFirstAndGetPlugin (file:///home/foo/dev/ask-my-pdf/node_modules/rollup/dist/es/shared/node-entry.js:19678:28)
at async resolveId (file:///home/foo/dev/ask-my-pdf/node_modules/rollup/dist/es/shared/node-entry.js:18359:26)
at async ModuleLoader.resolveId (file:///home/foo/dev/ask-my-pdf/node_modules/rollup/dist/es/shared/node-entry.js:18762:15)
at async file:///home/foo/dev/ask-my-pdf/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:8444:16
at async Promise.all (index 0)
`
The text was updated successfully, but these errors were encountered:
I tried to fix it with: "import fs from 'node:fs';" in "vite.config.ts", but it did not help. Any ideas how to fix this? Thanks!
`$ npm run build
plugin 'html-plugin' uses deprecated 'enforce' option. Use 'order' option instead.
plugin 'html-plugin' uses deprecated 'transform' option. Use 'handler' option instead.
vite v5.2.11 building for production...
[plugin:vite:resolve] [plugin vite:resolve] Module "crypto" has been externalized for browser compatibility, imported by "/home/foo/dev/ask-my-pdf/node_modules/@nico-martin/tvmjs/lib/index.js". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
[plugin:vite:resolve] [plugin vite:resolve] Module "perf_hooks" has been externalized for browser compatibility, imported by "/home/foo/dev/ask-my-pdf/node_modules/@nico-martin/tvmjs/lib/index.js". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
✓ 79 modules transformed.
x Build failed in 1.31s
error during build:
Error: [vite-plugin-pwa:build] Failed to resolve entry for package "fs". The package may have incorrect main/module/exports specified in its package.json.
file: /home/foo/dev/ask-my-pdf/src/store/llm/LlmContextProvider.tsx
at packageEntryFailure (file:///home/foo/dev/ask-my-pdf/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:48264:17)
at resolvePackageEntry (file:///home/foo/dev/ask-my-pdf/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:48261:5)
at tryNodeResolve (file:///home/foo/dev/ask-my-pdf/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:48031:20)
at Object.resolveId (file:///home/foo/dev/ask-my-pdf/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:47781:28)
at file:///home/foo/dev/ask-my-pdf/node_modules/rollup/dist/es/shared/node-entry.js:19778:40
at async PluginDriver.hookFirstAndGetPlugin (file:///home/foo/dev/ask-my-pdf/node_modules/rollup/dist/es/shared/node-entry.js:19678:28)
at async resolveId (file:///home/foo/dev/ask-my-pdf/node_modules/rollup/dist/es/shared/node-entry.js:18359:26)
at async ModuleLoader.resolveId (file:///home/foo/dev/ask-my-pdf/node_modules/rollup/dist/es/shared/node-entry.js:18762:15)
at async file:///home/foo/dev/ask-my-pdf/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:8444:16
at async Promise.all (index 0)
`
The text was updated successfully, but these errors were encountered: