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.
default
✓ import sibilisp from 'sibilisp'
The package is primarily used as a CLI tool; importing it as a module is uncommon but supported.
compile
✓ import { compile } from 'sibilisp'
✗ const { compile } = require('sibilisp')
ESM-only in modern versions. CommonJS require may work if package supports it, but ESM is preferred.
prelude
✓ import { prelude } from 'sibilisp/prelude'
✗ import prelude from 'sibilisp'
The prelude is a separate module; importing from the main package will not include it.
repl
✓ import { repl } from 'sibilisp/repl'
REPL functionality is exported from a subpath; ensure your bundler supports package exports.
SibilispError
✓ import { SibilispError } from 'sibilisp'
Custom error class for compilation errors.
Install Sibilisp globally, write a simple LISP-like program greeting the user, transpile to JavaScript, and run it.
npm install -g sibilisp
echo '(defun hello (name) (print (+ "Hello, " name "!")))
(hello "World")' > hello.slisp
sibilisp hello.slisp -o hello.js
node hello.js
# Output: Hello, World!
sibilisp --version
Debug
Known issues
breakingVersion 0.12.0 changed the default output directory from 'build/' to 'dist/'.fixUse `--out-dir` flag to specify custom output directory.
affects: >=0.12.0 <0.13.0
deprecatedThe `--modules` flag is deprecated in favor of `--module-system`.fixReplace `--modules commonjs` with `--module-system commonjs`.
affects: >=0.14.0
breakingRemoved support for Node.js versions < 12.fixUpgrade Node.js to 12 or later.
affects: >=0.15.0
gotchaMacros defined in one file are not visible in other files unless explicitly imported.fixUse `(import-macros ...)` to share macros across files.
affects: >=0.10.0
gotchaTail recursion optimization only works with explicit `recur` form; plain recursive calls may cause stack overflow.fixUse `(recur ...)` inside `loop` for tail-call optimization.
affects: >=0.9.0
deprecatedThe `prelude` module's `map` function is being renamed to `fmap` to avoid conflict with JS Array.prototype.map.fixUse `prelude.fmap` instead of `prelude.map`.
affects: >=0.14.0
Errors
Common errors & fixes
Error: Cannot find module 'sibilisp/prelude'
Importing prelude from wrong path or bundler not resolving subpath exports.
fixUse `import { prelude } from 'sibilisp/prelude'` and ensure your bundler supports package exports (`exports` field in package.json). SyntaxError: Unexpected identifier
Using JavaScript keywords or invalid LISP syntax in .slisp file.
fixEnsure all s-expressions are correctly parenthesized and no stray JavaScript code is present.
sibilisp: command not found
Not installed globally or not in PATH.
fixRun `npm install -g sibilisp` or use `npx sibilisp`.
TypeError: (intermediate value) is not a function
Missing parentheses or incorrect macro expansion.
fixWrap function calls in parentheses: `(myfunc arg1 arg2)`. Check macro definitions.
Error: Unsupported node version. Please use Node.js 12 or newer.
Using an outdated Node.js version.
fixUpgrade Node.js to version 12 or later.
Audit
Dependencies
No dependency data recorded yet.