Severity: error | Blocks morph build: yes
Status: enforced by
morph check. The rule reports at the source site before codegen, so unsupported code cannot reach the C++ compiler.
You import a name from 'morph' that the module does not export:
error : mx-import-morph : `morphStore` is not exported by 'morph'
hint: Available: morphState, morphShared, morphEvent, morphEffect, useWindow, Window, CSS
Learn more: https://morph.levizr.com/docs/errors/mx-import-morph'morph' is not an npm package — it is the compiler's own API surface, and
every export maps to generated native code (morphState → signal allocation,
morphEvent → channel, CSS → stylesheet import). A name with no export has
no mapping, so any use of it would compile to a reference to nothing. The
check fails at the import line, before the phantom name spreads through your
code as mx-undefined noise.
The exported surface is: morphState, morphShared, morphEvent,
morphEffect, useWindow, Window, CSS.
Runtime APIs must keep their original names. Aliasing is rejected because codegen recognizes each API by its canonical binding name:
// ❌ Codegen does not recognize `effect`
import { morphEffect as effect } from 'morph';// ❌ morphStore does not exist — mx-import-morph
import { morphStore } from 'morph';
export default function App() {
return <div>Hello</div>;
}Typical cause: guessing a React-style name (useState, useEffect) or a
removed API (morphOn, morphEmit — see
mx-api-removed).
// ✅ Import a real export
import { morphState } from 'morph';
export default function App() {
const [count, setCount] = morphState(0);
return <div>{count}</div>;
}Steps:
morphOn/morphEmit), migrate to
morphEvent instead — see mx-api-removed.morph check.Do not disable this rule. Phantom imports always fail later with worse messages.