Coder Social home page Coder Social logo

Comments (53)

whatacold avatar whatacold commented on June 2, 2024 1

Just confirmed that the problem is caused by the mirrors. After removing mirrors from ~/.lein/profiles.clj, lein new reagent-frontend myproject works.

FYI, now ~/.m2/repository/reagent-frontend/lein-template/resolver-status.properties is as follows:

#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
#Sun Sep 05 10:28:09 CST 2021
maven-metadata-clojars.xml.lastUpdated=1630808889985
maven-metadata-central.xml.lastUpdated=1630808888850
maven-metadata-central.xml.error=

from reagent-template.

borkdude avatar borkdude commented on June 2, 2024

I suppose it's not yet on clojars.

from reagent-template.

yogthos avatar yogthos commented on June 2, 2024

Oh didn't expect this to be used yet. :) I'm basing this on the chestnut template, so I got the initial code checked in, but don't have it quite working yet. I plan to hold off on pushing this to clojars until there's a reagent release from the org. If you don't mind helping troubleshoot the template though I would appreciate the help with it. :)

from reagent-template.

borkdude avatar borkdude commented on June 2, 2024

@yogthos I was just going to suggest that Reagent needs something like Chestnut! Awesome!!!

from reagent-template.

jakecraige avatar jakecraige commented on June 2, 2024

Ahh I ran into this as well. Whoops. Maybe mention this in the readme? lol

from reagent-template.

yogthos avatar yogthos commented on June 2, 2024

@jakecraige ah good call, really didn't expect people to be looking at it so soon :)

from reagent-template.

jakecraige avatar jakecraige commented on June 2, 2024

@yogthos I was going to use https://github.com/gadfly361/reagent-seed but this project seemed simpler for me to start with. I'm so new and don't understand anything yet, lol.

Instructions on how to use this until it's released would also be good :) thanks

from reagent-template.

yogthos avatar yogthos commented on June 2, 2024

@jakecraige @borkdude forgot to mention, luminus provides a decent reagent setup when you use +cljs flag. It doesn't setup figwheel or austin, but it does have a cljs-build config for dev/prod and a small template app.

from reagent-template.

borkdude avatar borkdude commented on June 2, 2024

Just FYI, I'm am using my own template modelled more or less after Chesnut for creating Reagent + Liberator projects: https://github.com/borkdude/lein-new-liberagent for now, but I'm following this template with interest :)

from reagent-template.

yogthos avatar yogthos commented on June 2, 2024

I have somewhat mixed feelings about liberator myself. I'm more inclined to include compojure-api instead.

from reagent-template.

yogthos avatar yogthos commented on June 2, 2024

template should be building correctly now, I haven't had a chance to test the cljs repl though

from reagent-template.

jakecraige avatar jakecraige commented on June 2, 2024

@yogthos Does figwheel work for you in the current version? Like when you change something does the browser update? I'm having to refresh mine

from reagent-template.

yogthos avatar yogthos commented on June 2, 2024

I haven't got around to playing with it yet, it should work the same as the chestnut tempalte in theory

from reagent-template.

jakecraige avatar jakecraige commented on June 2, 2024

@yogthos Yeah that's what I was thinking. I'm sitting here comparing them and I don't see much of a difference except that it's not reloading for me :/ I'll keep playing with it I suppose.

Currently my process for running the server is

lein ring server
lein repl
(start-figwheel)

Then I go and I can view it. I make changes and it says it's sending changes in the repl but I have to hard refresh to see them

from reagent-template.

yogthos avatar yogthos commented on June 2, 2024

that seems like it should work, let me know if you make headway on it

from reagent-template.

jakecraige avatar jakecraige commented on June 2, 2024

@yogthos I wonder if this part has anything to do with it https://github.com/plexus/chestnut/blob/master/src/leiningen/new/chestnut/src/clj/chestnut/server.clj#L21

from reagent-template.

yogthos avatar yogthos commented on June 2, 2024

lein-ring should be handling reloads

from reagent-template.

jakecraige avatar jakecraige commented on June 2, 2024

@yogthos Looks like the stuff in env/dev/cljs isn't being injected. When I manually add it into the core file it works

from reagent-template.

yogthos avatar yogthos commented on June 2, 2024

ah so I probably just need to load it in the html template then

from reagent-template.

yogthos avatar yogthos commented on June 2, 2024

does it work when you add

<script type="text/javascript">goog.require("myapp.dev");</script>

in resources/templates/index.html?

from reagent-template.

jakecraige avatar jakecraige commented on June 2, 2024

Sec I'll try
edit:
@yogthos It can't find that namespace actually

from reagent-template.

yogthos avatar yogthos commented on June 2, 2024

hmm, found some typos in the env cljs, but for some reason dev doesn't seem to be loaded for me

from reagent-template.

yogthos avatar yogthos commented on June 2, 2024

oh nm I see I changed the name for the build config, sec

from reagent-template.

yogthos avatar yogthos commented on June 2, 2024

ok just pushed an update, looks to be working

from reagent-template.

jakecraige avatar jakecraige commented on June 2, 2024

@yogthos Won't that break for a prod build? Since you're still requiring .dev in the index.html?

from reagent-template.

yogthos avatar yogthos commented on June 2, 2024

only if the dev flag is set though :)

from reagent-template.

jakecraige avatar jakecraige commented on June 2, 2024

Ahh that's right

from reagent-template.

jakecraige avatar jakecraige commented on June 2, 2024

Sweet, live reload is working now.

Also, for anyone wanting to work with this while it's being developed. This is how you get it running locally.

git clone https://github.com/reagent-project/reagent-template.git
cd reagent-template
lein install
lein new reagent <app-name>
cd <app-name>

You can use ring to run the server. So in one terminal run lein ring server and in the other start up a repl with lein repl. Inside of there you can run (start-figwheel) and (browser-repl) to start those up. Go to http://localhost:3000 and enjoy

from reagent-template.

yogthos avatar yogthos commented on June 2, 2024

looks like lein ring uberjar won't compile cljs correctly though. The cljs-build seems to be getting invoked since it says Compiling ClojureScript. but doesn't actually produce a js file. :(

from reagent-template.

yogthos avatar yogthos commented on June 2, 2024

So best I've got right now is to explicitly set the profile for release, which doesn't seem too horrible:

lein with-profile release ring uberjar

from reagent-template.

Whoops avatar Whoops commented on June 2, 2024

IIRC you need to include :jar true in the cljsbuild configuration for it to actually get included.

from reagent-template.

yogthos avatar yogthos commented on June 2, 2024

ah yes looks like that did the trick! :)

also looks like the reagent group is taken on Cojars, so might have to rename the template to something, maybe reagent-site or does anybody have better suggestions?

from reagent-template.

jakecraige avatar jakecraige commented on June 2, 2024

@yogthos What about just reagent-project like the org name?

from reagent-template.

yogthos avatar yogthos commented on June 2, 2024

hmm apparently that already exists on Clojars https://clojars.org/reagent-project/lein-template so we might need a new group id...

from reagent-template.

Whoops avatar Whoops commented on June 2, 2024

I'm pretty sure @holmsand has the reagent group. He should be able to add us to it.

from reagent-template.

yogthos avatar yogthos commented on June 2, 2024

that would be ideal, worst case we could reach out to the guy who own the reagent-project on Clojars (https://twitter.com/HansJSchmid) see if he might be willing to give it to us. :)

from reagent-template.

Whoops avatar Whoops commented on June 2, 2024

Yeah he does: https://clojars.org/groups/reagent, so we should probably use that. reagent/lein-template is nicer anyway.

from reagent-template.

yogthos avatar yogthos commented on June 2, 2024

agreed, less typing too :)

from reagent-template.

Frozenlock avatar Frozenlock commented on June 2, 2024

Ran into this issue as well. :-)

from reagent-template.

Whoops avatar Whoops commented on June 2, 2024

@holmsand any chance we could get @yogthos added to the reagent group on Clojars so he can publish this under reagent/lein-template?

from reagent-template.

holmsand avatar holmsand commented on June 2, 2024

Sure. Just tell me what I need to do to make that happen.

from reagent-template.

Whoops avatar Whoops commented on June 2, 2024

@holmsand If you hit https://clojars.org/groups/reagent while logged in, you should see an add member option. Anyone you add there will share control of the group and be able to push new projects. I'm also whoops on Clojars and I'm pretty sure @yogthos is yogthos. I don't know about @seancorfield.

Caveat: I'm pretty sure that gives us full control of the group, so hopefully your comfortable with that. If not we'll have to figure something else out.

from reagent-template.

holmsand avatar holmsand commented on June 2, 2024

Ok, that was easy. I've added yogthos and whoops to the reagent group.

from reagent-template.

Whoops avatar Whoops commented on June 2, 2024

Perfect thanks!

from reagent-template.

yogthos avatar yogthos commented on June 2, 2024

@holmsand @Whoops fantastic thanks, we should probably push out the current reagent from the org and then I'll update the template and reagent-forms to reference the current project.

from reagent-template.

seancorfield avatar seancorfield commented on June 2, 2024

Surprisingly, Iā€™m seancorfield :)

On Oct 28, 2014, at 9:02 AM, Walton Hoops [email protected] wrote:
I don't know about @seancorfield https://github.com/seancorfield.

from reagent-template.

holmsand avatar holmsand commented on June 2, 2024

@seancorfield You don't say... Welcome to the reagent group on clojars, then.

from reagent-template.

seancorfield avatar seancorfield commented on June 2, 2024

šŸ‘

from reagent-template.

Frozenlock avatar Frozenlock commented on June 2, 2024

Well then... I guess this issue can be closed.

from reagent-template.

whatacold avatar whatacold commented on June 2, 2024

Hi,

I also ran into this today when I was trying to play with reagent, but failed (lein version 2.9.6):

$ lein new reagent-frontend play-reagent-frontent
Failed to resolve version for reagent-frontend:lein-template:jar:RELEASE: Could not find metadata reagent-frontend:lein-template/maven-metadata.xml in local (/home/whatacold/.m2/repository)
Failed to read artifact descriptor for reagent-frontend:lein-template:jar:RELEASE
This could be due to a typo in :dependencies, file system permissions, or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
Could not find template reagent-frontend on the classpath.

But lein new reagent foo works, what could be the problem?

from reagent-template.

yogthos avatar yogthos commented on June 2, 2024

Hi,

I'm not able to reproduce the issue locally. One thing to try might be to clear out ~/.m2/repository/reagent-frontend/lein-template folder to see if there's a cached template causing an issue.

from reagent-template.

whatacold avatar whatacold commented on June 2, 2024

Thanks.

After mv ~/.m2/repository/reagent-frontend/{,.bak}, it still doesn't work, and the error message is same.

But I notice that a new ~/.m2/repository/reagent-frontend/ is created:

# pwd is ~/.m2/repository
$ tree reagent-frontend/
reagent-frontend/
ā””ā”€ā”€ lein-template
    ā””ā”€ā”€ resolver-status.properties

$ cat reagent-frontend/lein-template/resolver-status.properties
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
#Tue Aug 31 00:36:44 CST 2021
maven-metadata-tsinghua.xml/@192.168.1.1\:12345>@default-tsinghua-https\://mirrors.tuna.tsinghua.edu.cn/clojars/.lastUpdated=1630341404261
maven-metadata-aliyun.xml.error=Could not transfer metadata reagent-frontend\:lein-template/maven-metadata.xml from/to aliyun (https\://maven.aliyun.com/repository/public/)\: Checksum validation failed, no checksums available
maven-metadata-aliyun.xml/@192.168.1.1\:12345>@default-aliyun-https\://maven.aliyun.com/repository/public/.lastUpdated=1630341404488
maven-metadata-tsinghua.xml.error=Could not transfer metadata reagent-frontend\:lein-template/maven-metadata.xml from/to tsinghua (https\://mirrors.tuna.tsinghua.edu.cn/clojars/)\: Checksum validation failed, expected f5a8f4da358ee257ead04c314c047dedefbe2962 but is 87caff4a2f9beaad6c80c4f015ac1db0435d27b3

In the properties file, 192.168.1.1:12345 is a http proxy, and tsinghua & aliyun are mirrors that I use.

Looks like a mirror problem?

from reagent-template.

yogthos avatar yogthos commented on June 2, 2024

Yeah that sounds plausible.

from reagent-template.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.