The middleware and common serverless components are currently published to a private NPM repository, hosted on Azure DevOps.
The following scoped common packages are available:
"dependencies": {
"@multicloud/sls-core": "latest",
"@multicloud/sls-aws": "latest",
"@multicloud/sls-azure": "latest,
}
In order to fetch any common packages via npm i
, you must first provision and configure a token.
In order to access (read or write) to/from this NPM reposistory, you will need to:
- Provision a Personal Access Token (PAT) on the Azure DevOps portal, under Profile --> Security --> Personal access tokens
- Tokens only require
Packaging (read & write)
scope - Tokens have a max expiry of one year (there is no support for non-expiring tokens)
- Tokens only require
- Prior to running any NPM commands, be sure to set
NPM_TOKEN
as an environment variable, using the base64 encoded PAT token that was previously created.
Q: I'm getting this error: Error: Failed to replace env in config: ${NPM_TOKEN}
A: You will see this error if you run any NPM command without first setting the NPM_TOKEN
environment variable
Q: I'm getting a 401 (Unauthorized)
when running NPM commands, with the NPM_TOKEN
environment variable set.
A: Make sure you successfully provisioned your Personal Access Token (PAT) on the Azure DevOps portal and make sure environment variable was set and base64 encoded.