hildebrand icon indicating copy to clipboard operation
hildebrand copied to clipboard

Issue loading Hildebrand using Boot?

Open jamescgibson opened this issue 7 years ago • 1 comments

Hello,

Caveat: I suspect that this is probably an issue with how I'm loading things, and not with hildebrand itself, but any advice here would be appreciated.

I'm trying to use hildebrand on a toy project to create an AWS Lambda Function using CLJS. I'm using boot as my build tool, instead of leiningen.

When I run my lambda function, aws-sam-local (functions.js is the compiled file), I get:

module initialization error: TypeError
    at Object.<anonymous> (/var/task/functions.js:3251:21)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/var/task/tournaments.js:2:9)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)

This is happening even with this minimal file:

(ns functions.core
  (:require [cljs-lambda.macros :Refer-macros [defgateway]]
                 [promesa.core :as p]
                 [hildebrand.channeled :refer [query!]]))

However, given I can require other libraries without issue, I think there must be something at least related to Hildebrand here.

I'm compiling using the google closure compiler with simple optimizations.

Any advice? Thank you!

jamescgibson avatar Dec 11 '17 07:12 jamescgibson

The R in refer-macros looks capitalised, which'd be a problem.

moea avatar Dec 11 '17 08:12 moea