First LMS export¶
Deprecated as primary path. Use LMS Go-Live first. This page is a short appendix checklist only.
Appendix — read LMS Go-Live first
This page is a shortcut checklist only. For the full smoke-test vs production decision tree, SCORM path diagram, and troubleshooting links, start with LMS Go-Live.
Export your course to SCORM (or other LMS targets) after you have a working local preview. For the fastest local start, complete Getting started in 5 minutes first.
Prerequisites: A project from lessonkit init with npm run dev working. Node.js: Prerequisites — decision table.
Checklist¶
src/courseConfig.ts—lxpack.bridge: "auto"andallowedParentOriginsset.env—VITE_ANALYTICS_URLandVITE_XAPI_PROXY_URLor tracking/xAPI disabled for smoke test onlynpm run buildsucceeded (dist/exists)lessonkit.jsonIDs match ReactcourseId,lessonId, andcheckIdvaluesnpm run package:scorm12(or your target) — note the ZIP path the CLI prints
1. Prepare for LMS packaging¶
Before SCORM/xAPI/cmi5 export, enable the LMS bridge so completions and scores reach the parent frame.
In src/courseConfig.ts, set:
lxpack: {
bridge: "auto",
allowedParentOrigins: ["https://your-lms.example"],
},
The init template defaults to "off" for local standalone preview. Details: LXPack bridge reference.
Production runtime for LMS¶
Packaged courses run in production mode. The init template expects proxy URLs when import.meta.env.PROD is true:
Copy
.env.exampleto.envand setVITE_ANALYTICS_URLandVITE_XAPI_PROXY_URLto your backend proxies (never embed LRS passwords in the bundle).Re-run
npm run buildbefore packaging so Vite inlines those values.
First export only (no analytics yet): temporarily disable delivery in courseConfig.ts:
tracking: { enabled: false },
xapi: { enabled: false },
Re-enable and wire real transports before go-live—see the production checklist.
2. Package for your LMS¶
npm run package:scorm12
Or:
npx lessonkit package --target scorm12
The CLI prints the resolved path, for example: Packaged scorm12 → …/course-scorm12.zip.
Your SCORM zip is here
After a successful package:scorm12 run, upload the ZIP path the CLI prints. Default path: see FAQ — SCORM zip location (canonical reference for all targets).
Where the SCORM zip lands¶
By default, lessonkit.json sets:
"paths": {
"lxpackOutDir": ".lxpack/course",
"outputBaseDir": ".lxpack/out"
}
outputBaseDir is resolved inside lxpackOutDir, not at the project root:
my-course/
├── lessonkit.json
├── dist/ ← Vite build
└── .lxpack/course/ ← paths.lxpackOutDir
└── .lxpack/out/ ← paths.outputBaseDir
├── course-scorm12.zip ← upload this
├── course-xapi.zip
└── standalone/ ← standalone target
Trust lessonkit package stdout if your paths differ. Override with --out path/to/custom.zip (must stay inside the project directory).
Next steps¶
LMS Go-Live — canonical guide (return here for production branch)
Production checklist — observability hooks, transport timeouts (appendix)
Deployment guide — SCORM vs standalone vs xAPI matrix
Troubleshooting — packaging paths, bridge allowlist, ID parity
Packaging and CLI — all
--targetvalues