简体   繁体   中英

Twilio Functions Dependency - Use Private Node module

How can i include private npm package as my dependency module in Twilio functions. I have a node module in AWS CodeArtifcate which requires npm run co:login aws codeartifact login --tool npm --repository {REPO_NAME} --domain {DOMAIN_NAME}

While i include a private module i am getting

Some dependencies could not be validated. Failed to find the @scope/module_name package.

Twilio developer evangelist here.

We do not currently have a way of connecting npm installs to private registries which is leading to your error message.

The current solution for including private code would be to use private assets and load the dependency using require(Runtime.getAssets()[PATH]) .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM