{"id":26662,"library":"wyvern","title":"Wyvern","description":"wyvern is a reactive JavaScript transpiler that compiles reactive syntax into standard JavaScript. At version 0.2.0, it is in early development with an unstable API. It differentiates itself by providing a declarative reactive programming model that compiles to efficient vanilla JS, targeting developers who want reactivity without a runtime library. The package is meant to be used as a build tool (transpiler) and is not designed for runtime use. Release cadence is unknown as the project is new.","status":"active","version":"0.2.0","language":"javascript","source_language":"en","source_url":"https://github.com/davidbastien5/Wyvern","tags":["javascript"],"install":[{"cmd":"npm install wyvern","lang":"bash","label":"npm"},{"cmd":"yarn add wyvern","lang":"bash","label":"yarn"},{"cmd":"pnpm add wyvern","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package is ESM-only; CommonJS require will not work.","wrong":"const wyvern = require('wyvern'); const compile = wyvern.compile;","symbol":"compile","correct":"import { compile } from 'wyvern';"},{"note":"Default export may not exist; prefer named imports.","wrong":"const wyvern = require('wyvern');","symbol":"default (module)","correct":"import wyvern from 'wyvern';"},{"note":"Check if transform is exported; version 0.2.0 may have limited exports.","symbol":"transform","correct":"import { transform } from 'wyvern';"}],"quickstart":{"code":"import { compile } from 'wyvern';\nimport { readFileSync, writeFileSync } from 'fs';\n\nconst source = readFileSync('input.js', 'utf8');\ntry {\n  const output = compile(source, { sourceType: 'module' });\n  writeFileSync('output.js', output.code, 'utf8');\n} catch (e) {\n  console.error('Compilation failed:', e.message);\n}","lang":"javascript","description":"Shows how to use the compile function to transpile a source file, with error handling."},"warnings":[{"fix":"Pin to exact version and expect breaking changes.","message":"API is unstable and may change without notice in versions < 1.0.0.","severity":"breaking","affected_versions":"<1.0"},{"fix":"Use ES module syntax (import) or dynamic import() in CommonJS projects with bundler.","message":"Package is ESM-only; CommonJS require will fail with ERR_REQUIRE_ESM.","severity":"gotcha","affected_versions":">=0.1"},{"fix":"Supply only sourceType if unsure; options object may be ignored.","message":"compile() options may be incomplete; check documentation for supported options.","severity":"gotcha","affected_versions":"0.2.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Replace require('wyvern') with import statements or use dynamic import.","cause":"Using require() to import an ESM-only package.","error":"ERR_REQUIRE_ESM"},{"fix":"Use named import: import { compile } from 'wyvern';","cause":"Default import or wrong import path.","error":"TypeError: wyvern.compile is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}