-
Notifications
You must be signed in to change notification settings - Fork 1
Installation
CodeEngine is published as an NPM package, which can be installed using the NPM CLI.
To install CodeEngine, you need the following software to be installed first:
To see if you have Node.js installed, or to check which version you have installed, open a terminal window and run the following command:
node --version
If you get an error, then Node isn't installed. If you see a version number that's lower than 13.0.0, then you need a newer version. Either way, you can go here to download Node.js and install it.
You'll need NPM to install CodeEngine, generators, and plugins. NPM is installed automatically by Node.js, so you may already have it. Open a terminal window and run the following command to check:
npm --version
Install CodeEngine using the npm install
command. Add the -g
flag to install globally so you can run CodeEngine from any terminal window.
npm install -g code-engine
To verify that CodeEngine installed successfully, run the following command:
code-engine --help
Depending on the security settings of your computer, you may get permissions errors when installing CodeEngine, generators, or plugins via NPM. If you see an EACCES
error, or any other error related to permissions, then there are a couple workarounds.
By default, NPM installs global packages in a system directory that you might not have write access to, which could cause permissions errors. You can change NPM's default directory to one that you do have write access to.
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'NPM_CONFIG_PREFIX=~/.npm-global` > ~/.profile
When running the npm install
command, you can add --unsafe-perm
to the end of the command. This installs the package using your user account, rather than the default low-privileged account.
npm install -g code-engine --unsafe-perm
You can also configure NPM to use unsafe-perm
by default, so you don't have to specify it each time.
npm config set unsafe-perm true
Customization
API Reference