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
node_modules/ollama/dist/index.mjs (2:13): "promises" is not exported by "node_modules/node-stdlib-browser/esm/mock/empty.js", imported by "node_modules/ollama/dist/index.mjs".
#141
Open
czwlkjgzs opened this issue
Sep 7, 2024
· 1 comment
x Build failed in 9.38s
error during build:
node_modules/ollama/dist/index.mjs (2:13): "promises" is not exported by "node_modules/node-stdlib-browser/esm/mock/empty.js", imported by "node_modules/ollama/dist/index.mjs".
file: D:/myCodes/projectCodes/czwl-ollama-webui/node_modules/ollama/dist/index.mjs:2:13
1: import { O as Ollama$1, h as head, p as post } from './shared/ollama.5360ad67.mjs';
2: import fs, { promises, createReadStream } from 'fs';
^
3: import { resolve, join, dirname } from 'path';
4: import { createHash } from 'crypto';
at getRollupError (file:///D:/myCodes/projectCodes/czwl-ollama-webui/node_modules/rollup/dist/es/shared/parseAst.js:392:41)
at error (file:///D:/myCodes/projectCodes/czwl-ollama-webui/node_modules/rollup/dist/es/shared/parseAst.js:388:42)
at Module.error (file:///D:/myCodes/projectCodes/czwl-ollama-webui/node_modules/rollup/dist/es/shared/node-entry.js:13967:16)
at Module.traceVariable (file:///D:/myCodes/projectCodes/czwl-ollama-webui/node_modules/rollup/dist/es/shared/node-entry.js:14414:29)
at ModuleScope.findVariable (file:///D:/myCodes/projectCodes/czwl-ollama-webui/node_modules/rollup/dist/es/shared/node-entry.js:12121:39)
at ChildScope.findVariable (file:///D:/myCodes/projectCodes/czwl-ollama-webui/node_modules/rollup/dist/es/shared/node-entry.js:7467:38)
at ClassBodyScope.findVariable (file:///D:/myCodes/projectCodes/czwl-ollama-webui/node_modules/rollup/dist/es/shared/node-entry.js:7467:38)
at ChildScope.findVariable (file:///D:/myCodes/projectCodes/czwl-ollama-webui/node_modules/rollup/dist/es/shared/node-entry.js:7467:38)
at ChildScope.findVariable (file:///D:/myCodes/projectCodes/czwl-ollama-webui/node_modules/rollup/dist/es/shared/node-entry.js:7467:38)
at FunctionScope.findVariable (file:///D:/myCodes/projectCodes/czwl-ollama-webui/node_modules/rollup/dist/es/shared/node-entry.js:7467:38)
I've already use import ollama from ollama/browser.
But the error occured when I try vite build.
this is my vite.config.js
import {fileURLToPath, URL} from 'node:url'
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import {ElementPlusResolver} from 'unplugin-vue-components/resolvers'
import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import {nodePolyfills} from "vite-plugin-node-polyfills"
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
[vue()],
AutoImport({
imports: ['vue', 'vue-router'],
// dts: 'src/auto-import.d.ts',
dts: 'auto-import.d.ts',
resolvers: [ElementPlusResolver()],
}),
Components({
resolvers: [ElementPlusResolver()],
}),
nodePolyfills({protocolImports: true}),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
},
}
})
The text was updated successfully, but these errors were encountered:
I've already use
import ollama from ollama/browser
.But the error occured when I try
vite build
.this is my
vite.config.js
The text was updated successfully, but these errors were encountered: