Severity: error | Blocks morph build: yes
Status: reported by
morph check. Member accesses (Math.min,JSON.parse,console.table) point at the full access; bare references (const f = JSON) point at the root. Locally shadowed names are your own and stay quiet.
You access a member of a JS builtin object Morph does not implement — for
example Math.imul, Date.now, RegExp, or console.table beyond
log/warn/error/info:
error : mx-js-member : Unsupported member `JSON.parse` — no native counterpart
hint: Parse with explicit conversion code or a `.cpp` helper
Learn more: https://morph.levizr.com/docs/errors/mx-js-memberMorph's runtime types (JsNumber, JsString, JsArray, JsObject — see
runtime types) implement a curated subset of
JavaScript semantics with zero-overhead native backing. Members outside that
subset (Math.imul, JSON.rawJSON, Date.now, RegExp, console.table)
have no implementation to call into. Rather than stubbing them with wrong
semantics, Morph rejects the access and points at the replacement.
// ❌ Math.imul is not implemented — mx-js-member
export default function App() {
const hash = Math.imul(31, 7);
return <div>{hash}</div>;
}// ❌ console.table is not implemented (log/warn/error/info are) — mx-js-member
export default function App() {
console.table([1, 2, 3]);
return <div>Hello</div>;
}// ✅ console.log/warn/error/info are supported
export default function App() {
console.log("rendered");
return <div>Hello</div>;
}For the rest, options in order of preference:
.cpp helper — implement it natively and import it (see
native C++).// ✅ Native helper for unsupported builtins
import { parseCount } from './helpers.cpp';
export default function App() {
return <div>{parseCount("3")}</div>;
}Steps:
.cpp function and import it.morph check.Do not disable this rule. Unimplemented members have no code to call.