bhauman / bhauman/react-native-figwheel-bridge

target needs to be in deps.edn :paths key

Open
#3 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
80
Forks
10
PR merge metrics
No merged PRs in 30d

Description

The sample project only worked once I added `"target"` to my `deps.edn` file

```clojure
{:paths ["src" "resources" "target"]
:deps {org.clojure/clojurescript {:mvn/version "1.10.439"}
com.bhauman/figwheel-main {:mvn/version "0.2.1-SNAPSHOT"}}}
```

Otherwise I was getting this error in my call to figwheel main
```shell
➜ clj -m figwheel.main -b ios -r
2019-01-04 09:08:23.188:INFO::main: Logging initialized @5067ms to org.eclipse.jetty.util.log.StdErrLog
[Figwheel:WARNING] Attempting to dynamically add "target" to classpath!
[Figwheel:WARNING] Target directory "target" is not on the classpath
[Figwheel:WARNING] Please fix this by adding "target" to your classpath
I.E.
For Clojure CLI Tools in your deps.edn file:
ensure "target" is in your :paths key

For Leiningen in your project.clj:
add it to the :resource-paths key

[Figwheel] Compiling build ios to "target/public/cljs-out/ios-main.js"
[Figwheel] Successfully compiled build ios to "target/public/cljs-out/ios-main.js" in 7.756 seconds.
[Figwheel] Watching paths: ("src") to compile build - ios
[Figwheel] Starting Server at http://localhost:9500
[Figwheel] Starting REPL
Prompt will show when REPL connects to evaluation environment (i.e. a REPL hosting webpage)
Figwheel Main Controls:
(figwheel.main/stop-builds id ...) ;; stops Figwheel autobuilder for ids
(figwheel.main/start-builds id ...) ;; starts autobuilder focused on ids
(figwheel.main/reset) ;; stops, cleans, reloads config, and starts autobuilder
(figwheel.main/build-once id ...) ;; builds source one time
(figwheel.main/clean id ...) ;; deletes compiled cljs target files
(figwheel.main/status) ;; displays current state of system
Figwheel REPL Controls:
(figwheel.repl/conns) ;; displays the current connections
(figwheel.repl/focus session-name) ;; choose which session name to focus on
In the cljs.user ns, controls can be called without ns ie. (conns) instead of (figwheel.repl/conns)
Docs: (doc function-name-here)
Exit: :cljs/quit
Results: Stored in vars *1, *2, *3, *e holds last exception object
JavaScript environment will not launch automatically when :open-url is false
```

And this error from ios simulator
![screen shot 2019-01-04 at 9 23 53 am](https://user-images.githubusercontent.com/1841038/50695506-80e54980-1002-11e9-9e4b-5e7290d4dfea.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Open the sample project's deps.edn and reproduce the issue with `clj -m figwheel.main -b ios -r`. Confirm that the target directory is included in the :paths key and that the command no longer warns about dynamically adding target to the classpath or causes the reported iOS simulator error.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure, javascript, react-native
Domain
build-system, mobile
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.