Missing dependencies for a module ltn12

727 Views Asked by At

I'm creating a module to send a mail using sendgrid (still very earlier stage)

I have following 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"
   }
}

the module needed to send emails using sendgrid api is required below

-- sengrid.lua file.
local ltn12 = require("ltn12")
local cjson = require('cjson')
local http = require("socket.http")

A closer look at ltn12 reveals that the module is part of luasocket(which is already defined in the dependencies).

Now every time I try to install the sendgrid module using luarocks.

sudo luarocks install sendgrid

Installing https://luarocks.org/sendgrid-0.1.0-1.src.rock... Using https://luarocks.org/sendgrid-0.1.0-1.src.rock... switching to 'build' mode

Missing dependencies for sendgrid: ltn12

I'm very new to lua and I'm exploring creating the module thing for sendgrid since I could not find one.

What I'm supposed to do to solve this without actually installing lt12 module explicitly.

0

There are 0 best solutions below