-
Notifications
You must be signed in to change notification settings - Fork 250
Common Issues
Before getting started, ensure you have Node.js and Git installed, then install the Adapt CLI globally:
npm install -g adapt-cliWhen running adapt commands, you may receive an error indicating that Git is not installed or not found. Check that Git is installed and available in your system path. See git-scm.com for installation instructions.
If npm install or grunt fails unexpectedly, check that your Node.js version meets the framework's requirements. The minimum supported version is listed in the engines field of package.json. Use a version manager like nvm to switch versions:
nvm install 18
nvm use 18This usually means node_modules is missing or incomplete. Delete the folder and reinstall:
rm -rf node_modules
npm installYou must run grunt build before grunt server. The server has nothing to serve until the course has been built:
grunt build
grunt serverAdapt courses must be served over HTTP or HTTPS. Opening index.html directly in a browser via a file:// path will fail due to browser security restrictions, even if all files are present.
Use grunt server to preview locally, or deploy to any web server.
If the course builds successfully but stalls on a loading spinner in the browser, check the browser console for errors. A common cause is a JSON syntax error in one of the course content files (e.g. course.json, contentObjects.json). The console will identify the failing file — fix the syntax error and rebuild.
Some web servers — typically Microsoft IIS or SharePoint — do not serve .json files by default, causing the course to fail on load.
Option 1 — Add the JSON mime-type to your server configuration (preferred).
Option 2 — If you can't change the server config, use the .txt extension instead. Rename all .json files to .txt, then use the --jsonext flag with Grunt commands:
grunt build --jsonext=txt- Framework in Five Minutes
- Setting up Your Development Environment
- Manual Installation of the Adapt Framework
- Adapt Command Line Interface
- Common Issues
- Reporting Bugs
- Requesting Features
- Creating Your First Course
- Styling Your Course
- Configuring Your Project with config.json
- Content starts with course.json
- Course Localisation
- Compiling, testing and deploying your Adapt course
- Core Plugins in the Adapt Learning Framework
- Converting a Course from Framework Version 1 to Version 2
- Contributing to the Adapt Project
- Git Flow
- Adapt API
- Core Events
- Core Model Attributes
- Core Modules
- States and Indicators
- Right to Left (RTL) Support
- Web Security Audit
- Peer Code Review
- Plugins
- Developing Plugins
- Developer's Guide: Components
- Developer's Guide: Theme
- Making a theme editable
- Developer's Guide: Menu
- Registering a Plugin
- Semantic Version Numbers
- Migration scripts