Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot launch figwheel-ed node scripts with serve #11

Closed
arichiardi opened this issue Jul 21, 2017 · 5 comments
Closed

Cannot launch figwheel-ed node scripts with serve #11

arichiardi opened this issue Jul 21, 2017 · 5 comments

Comments

@arichiardi
Copy link

Hello @flyboarder,
this is actually a problem that I already see will be difficult to solve cleanly in boot.

I am basically getting:

Figwheel: Can't start Figwheel!! Please make sure ws is installed
 do -> 'npm install ws'

With the following task:

(deftask dev
  "Launches the interactive environment"
  [p port PORT int "Set the repl port"]
  (let [port (or port 5055)]
    (comp (watch)
          (notify)
          (reload :client-opts {:debug true}) ;; boot-figreload task
          (cljs-repl :nrepl-opts {:port port})
          (cljs :source-map true :optimizations :none)
          (serve :script "app")))) ;; boot-nodejs task

This happens because the app.js file is launched from the boot cache and of course does not have the correspondent node_modules anywhere, neither in the folder, nor in the parent (which is the case when you actually execute a script from target).

The solution of copying node_modules to the boot cache is a scary one, so I leave this here open for discussion.

@burn2delete
Copy link
Member

burn2delete commented Jul 21, 2017

Boot-npm could do the node modules folder for you, do you have other suggestions?

https://github.com/degree9/boot-npm

@arichiardi
Copy link
Author

I was actually thinking, together with Martin and other folks at EuroClojure, that a symlink could do the job very well. We could create it in the parent or same boot cache folder and delete it afterwards. In any case boot already uses links in the cache file. This would enable seamless and fast launch (no need to create a node_modules from scratch)

@burn2delete
Copy link
Member

@arichiardi this actually has a few issues, boot doesn't support symlinks as far as I can tell
boot-clj/boot#609
boot-clj/boot#610

@arichiardi
Copy link
Author

arichiardi commented Jul 21, 2017 via email

@burn2delete
Copy link
Member

@arichiardi using the latest versions of the library should allow you to do this. Please reopen if you continue to have issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants