mirror of
https://github.com/open-webui/open-webui
synced 2025-01-18 00:30:51 +00:00
fix
This commit is contained in:
parent
a4748af822
commit
edfe20b2e1
@ -24,6 +24,7 @@ async function downloadPackages() {
|
||||
const packageJson = JSON.parse(await readFile('package.json'));
|
||||
const pyodideVersion = packageJson.dependencies.pyodide;
|
||||
|
||||
try {
|
||||
const pyodidePackageJson = JSON.parse(await readFile('static/pyodide/package.json'));
|
||||
const pyodidePackageVersion = pyodidePackageJson.version;
|
||||
|
||||
@ -31,6 +32,9 @@ async function downloadPackages() {
|
||||
console.log('Pyodide version mismatch, removing static/pyodide directory');
|
||||
await rmdir('static/pyodide', { recursive: true });
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('Pyodide package not found, downloading packages');
|
||||
}
|
||||
|
||||
await pyodide.loadPackage('micropip');
|
||||
const micropip = pyodide.pyimport('micropip');
|
||||
|
Loading…
Reference in New Issue
Block a user