Skip to content

Cannot launch figwheel-ed node scripts with serve #11

Description

@arichiardi

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions