程序问答   发布时间:2022-06-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了新的compojure模板无法启动“标签名称空间无读取器功能”大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

如何解决新的compojure模板无法启动“标签名称空间无读取器功能”?

开发过程中遇到新的compojure模板无法启动“标签名称空间无读取器功能”的问题如何解决?下面主要结合日常开发的经验,给出你关于新的compojure模板无法启动“标签名称空间无读取器功能”的解决方法建议,希望对你解决新的compojure模板无法启动“标签名称空间无读取器功能”有所启发或帮助;

尝试将Leiningen降级为2.7.1:

lein upgrade 2.7.1

这是Leiningen 2.8.0中的回归。参见https://github.com/technomancy/leiningen/issues/2328。

解决方法

@H_874_13@

我正在尝试从中运行样板项目lein new compojure clojure-lice

运行时,lein ring server我收到以下可爱错误:

Exception in thread "main" java.lang.RuntimeException: No reader function for tag namespace

我的 project.clj

(defproject clojure-lice "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :min-lein-version "2.0.0"
  :dependencies [[org.clojure/clojure "1.8.0"]
                 [compojure "1.5.1"]
                 [ring/ring-defaults "0.2.1"]]
  :plugins [[lein-ring "0.9.7"]]
  :ring {:handler clojure-lice.handler/app}
  :profiles
  {:dev {:dependencies [[javax.servlet/servlet-api "2.5"]
                        [ring/ring-mock "0.3.0"]]}})

我的core.clj

(ns clojure-lice.handler
  (:require [compojure.core :refer :all]
            [compojure.route :as route]
            [ring.middleware.defaults :refer [wrap-defaults site-defaults]]))

(defroutes app-routes
  (GET "/" [] "Hello World")
  (route/not-found "Not Found"))

(def app
  (wrap-defaults app-routes site-defaults))

我的系统统计:

java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11,mixed modE)

Leiningen 2.8.0 on Java 9.0.1 Java HotSpot(TM) 64-Bit Server VM

Clojure 1.8.0
OSX 10.12.6

大佬总结

以上是大佬教程为你收集整理的新的compojure模板无法启动“标签名称空间无读取器功能”全部内容,希望文章能够帮你解决新的compojure模板无法启动“标签名称空间无读取器功能”所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。