moeru-ai/airi · info
import @proj-airi/plugin-protocol/types instead
Error message
import @proj-airi/plugin-protocol/types instead
What it means
The root entrypoint of @proj-airi/plugin-protocol is intentionally export-free; its entire module body is this console.warn directing you to the typed subpath. Importing the package root does not fail the build — it just pulls in a module that prints the warning and provides nothing.
Source
Thrown at packages/plugin-protocol/src/index.ts:1
console.warn('import @proj-airi/plugin-protocol/types instead')
View on GitHub (pinned to 677329427f)
Solutions
- Change the import specifier to '@proj-airi/plugin-protocol/types'
- Add an ESLint import restriction (import/no-restricted-imports) forbidding the bare package name so it fails lint instead of warning at runtime
Example fix
// before
import type { PluginProtocol } from '@proj-airi/plugin-protocol'
// after
import type { PluginProtocol } from '@proj-airi/plugin-protocol/types' Defensive patterns
Strategy: validation
Validate before calling
// before resolving, assert the subpath you meant to use
if (!specifier.startsWith('@proj-airi/plugin-protocol/')) {
throw new Error('import @proj-airi/plugin-protocol/types instead')
} Prevention
- Always deep-import '@proj-airi/plugin-protocol/types'
- Add import/no-restricted-imports for the bare package name
- Watch for the literal warning text in dev console — it only fires when the root was imported
When it happens
Trigger: Any `import ... from '@proj-airi/plugin-protocol'` (root specifier) instead of '@proj-airi/plugin-protocol/types'.
Common situations: IDE auto-complete inserting the root specifier; code migrated from an older layout where the root was the API; barrel-file tooling resolving to the root.
Related errors
- The entrypoint you imported for ${name} doesn't have any exp
- The entrypoint you imported for ${name} doesn't have any exp
- The file is not an AIRI Live2D motion project.
- The motion project source is invalid.
- The motion project source timeline is invalid.
AI-assisted analysis of moeru-ai/airi@677329427f (2026-08-18).
Data as JSON: /api/errors/8b37eeb47ab38c23.
Report an issue: GitHub.