uvicorn: 相对导入问题
约 1 分钟 #开发
应用结构:
.
├── app # ①: 应用所在文件夹
│ ├── __init__.py
│ ├── main.py
│ ├── dependencies.py
│ └── routers
│ │ ├── __init__.py
│ │ ├── items.py
│ │ └── users.py
│ └── internal
│ ├── __init__.py
│ └── admin.py
错误的:
uvicorn main:app
正确的:
cd ..
uvicorn app.main:app
app.main:app, 第一个app表示应用所在文件夹的名称(①) 也就是说你必须要退出去一个目录才可以...
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'isUnmounted')
wasm-pack: How to enable panic_immediate_abort
You can significantly reduce your Wasm bundle size (around ~50KB in my project) by enabling certain Rust flags during wasm-pack compilation to minimize panic information. Note that this feature is currently only available in nightly:
