简体   繁体   English

Twilio 函数依赖 - 使用私有节点模块

[英]Twilio Functions Dependency - Use Private Node module

How can i include private npm package as my dependency module in Twilio functions.我如何在 Twilio 函数中包含私有 npm 包作为我的依赖模块。 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}我在 AWS CodeArtifcate 中有一个节点模块,它需要 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.找不到@scope/module_name 包。

Twilio developer evangelist here. Twilio 开发人员布道者在这里。

We do not currently have a way of connecting npm installs to private registries which is leading to your error message.我们目前没有将 npm installs 连接到私有注册表的方法,这会导致您的错误消息。

The current solution for including private code would be to use private assets and load the dependency using require(Runtime.getAssets()[PATH]) .当前包含私有代码的解决方案是使用私有资产使用require(Runtime.getAssets()[PATH])加载依赖项

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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