问题描述
如何在 Twilio 函数中包含私有 npm 包作为我的依赖模块。我在 AWS CodeArtifcate 中有一个节点模块,它需要 npm 运行 co:login aws codeartifact 登录 --tool npm --repository {REPO_NAME} --domain {DOMAIN_NAME}
虽然我包含了一个私人模块
无法验证某些依赖项。找不到@scope/module_name 包。
解决方法
这里是 Twilio 开发者布道者。
我们目前没有办法将 npm 安装连接到私人注册表,这会导致您的错误消息。
包含私有代码的当前解决方案是使用 private assets 和 load the dependency using require(Runtime.getAssets()[PATH])
。