我正在创建一个使用sendgrid发送邮件的模块(仍处于早期阶段)
我有跟随rockspec
package = "sendgrid"
version = "0.1.0-1"
source = {
url = "git://github.com/meetme2meat/sendgrid"
}
description = {
summary = "Sendgrid V3 API to send mail",
detailed = [[
Send email using sendgrid.
]],
homepage = "https://github.com/meetme2meat/sendgrid",
license = "MIT"
}
dependencies = {
"lua >= 5.2, < 5.4",
"lua-cjson >= 2.0.0, <= 2.1.0",
"luasocket >= 3.0rc1",
"luasec"
}
build = {
type = "builtin",
modules = {
sendgrid = "sendgrid.lua"
}
}
Run Code Online (Sandbox Code Playgroud)
下面需要使用sendgrid api发送电子邮件所需的模块
-- sengrid.lua file.
local ltn12 = require("ltn12")
local cjson = require('cjson')
local http = require("socket.http")
Run Code Online (Sandbox Code Playgroud)
仔细观察会ltn12
发现模块是其中的一部分luasocket
(已在依赖项中定义).
现在每次我尝试使用luarocks安装sendgrid模块.
sudo luarocks install sendgrid
安装https://luarocks.org/sendgrid-0.1.0-1.src.rock ...使用 https://luarocks.org/sendgrid-0.1.0-1.src.rock ...切换到'build '模式
缺少sendgrid的依赖项:ltn12
我对lua很新,我正在探索为sendgrid创建模块的东西,因为我找不到它.
在没有lt12
明确安装模块的情况下我应该做些什么来解决这个问题.
归档时间: |
|
查看次数: |
131 次 |
最近记录: |