Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
AdminRenderer
✓ import { AdminRenderer } from 'phy-django-rest-admin'
✗ import AdminRenderer from 'phy-django-rest-admin/AdminRenderer'
Named export from package root. ESM only, no CJS. Works with Vue 3 and TypeScript.
AdminLayout
✓ import { AdminLayout } from 'phy-django-rest-admin'
✗ const AdminLayout = require('phy-django-rest-admin').AdminLayout
Named export, not default. CJS require() fails as package is ESM-only.
type AdminConfig
✓ import type { AdminConfig } from 'phy-django-rest-admin'
✗ import { AdminConfig } from 'phy-django-rest-admin'
Use `import type` for type-only imports in TypeScript. Runtime import will fail because it's not a value.
Shows minimal setup: create Vue 3 app, install Vue Router and Element Plus, import AdminRenderer component and style, mount with a single admin route.
import { createApp } from 'vue'
import { createRouter, createWebHistory } from 'vue-router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import { AdminRenderer } from 'phy-django-rest-admin'
import 'phy-django-rest-admin/dist/style.css'
const routes = [
{
path: '/admin',
component: AdminRenderer,
props: {
baseURL: process.env.VUE_APP_API_BASE ?? 'http://localhost:8000/api',
}
}
]
const router = createRouter({
history: createWebHistory(),
routes,
})
const app = createApp({})
app.use(ElementPlus)
app.use(router)
app.mount('#app')
Errors
Common errors & fixes
Cannot find module 'phy-django-rest-admin' or its corresponding type declarations.
Package is not installed or missing from node_modules.
fixRun `npm install phy-django-rest-admin` and ensure it's in dependencies.
Module not found: Error: Can't resolve 'phy-django-rest-admin' in /path/to/src
Webpack or Vite cannot resolve the package due to missing export or wrong path.
fixEnsure you are using the correct import: `import { AdminRenderer } from 'phy-django-rest-admin'` (not a subpath). TypeError: Cannot read properties of undefined (reading 'install')
Element Plus not installed or not initialized via app.use() before using admin components.
fixInstall element-plus and add `app.use(ElementPlus)` after creating the app.
Vue Router is not installed or not used. AdminRenderer requires vue-router to be registered.
Missing vue-router dependency or not calling app.use(router).
fixInstall vue-router and create a router instance, then `app.use(router).`
Audit
Dependencies
@element-plus/icons-vuerequiredRequired icon set for element-plus UI components
element-plusrequiredUI framework used for all components
vuerequiredPeer dependency for Vue 3 reactivity and composition API
vue-routerrequiredRequired for routing between admin views