Pedestal giving error

Hello all, I am trying to learn pedestal from http://pedestal.io/guides/hello-worl, this is my src/hello.clj

(ns hello
  (:require [io.pedestal.http as http]
            [io.pedestal.http.route as route]))

(defn respond-hello [request]
  {:status 200 :body "Hello world!"})

This is my deps.edn

{:deps
 {io.pedestal/pedestal.service {:mvn/version "0.5.7"}
  io.pedestal/pedestal.route   {:mvn/version "0.5.7"}
  io.pedestal/pedestal.jetty   {:mvn/version "0.5.7"}
  org.slf4j/slf4j-simple       {:mvn/version "1.7.28"}}
 :paths ["src"]}

But when I try this ((require 'hello) in clj, I get this error:

$ clj
Clojure 1.11.1
user=> (require 'hello)
Execution error (FileNotFoundException) at hello/eval140$loading (hello.clj:1).
Could not locate io/pedestal/http/as__init.class, io/pedestal/http/as.clj or io/pedestal/http/as.cljc on classpath.
user=>

Will be great if any one can throwsome light.

There’s a typo in the :require form - that as should be :as.

2 Likes

Ah! Thank you so much.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.