Install CLI tools and global modules
Please note that, due to security reasons, you can’t run commands using
sudo in CodeSandbox Repositories. On the other hand, we know it’s really important to set up your workspace as you wish and install additional tooling.
npm install -g installs global modules into
and links executables into
/usr/local/bin. So in Repositories, you have write access to these folders and you can install additional tools.
It is likely that at some point you will want to install some frameworks that require write access to several other folders. In cases like this, we recommend using Docker or NixOS.
Getting started with Docker and NixOS in Repositories
tasks.json, you can automate the creation of your development environment within Repositories.
You can run tasks from the UI or the Command Palette but global modules should be installed during the setup of your environment.
setupTasks will run every time Repositories is setting up your workspace. So now you have to move the command up to under
setupTasks. Also, don't forget to clean up tasks as you don't have to move every part of that entry created there.
Tip: Commit this file to your main branch. This is the only to ensure that tasks will be picked up next time you create a new branch!