Node modules
Different extensions do not share their dependencies. If two extensions use the same dependency, they both need to define it. |
Corteza Corredor supports internal and external node modules, both on the server-scripts and client-scripts.
Internally, we use the Yarn package manager. We suggest you do the same. |
-
manually insert it into the
package.json
file or -
run the
yarn add NAME_GOES_HERE
.
When ran, the Corredor server attempts to automatically resolve and install the requested dependencies.
We are observing some anomalies when running Yarn inside a docker container. If you’re getting an error message similar to the one below, it means that Yarn is not able to install the dependencies. This error occurs when Yarn is unable to store its cache. To fix the anomaly, you need to:
The dependencies should now be installed and available for use.
The above |
Node modules can then be used just like in any other situation.
{
"dependencies": {
"axios": "^0.18.0"
}
}
import axios from 'axios'
export default {
// ...
async exec() {
await axios.get(...)
// ...
}
}