Fork me on GitHub
#figwheel
<
2017-08-23
>
sashton18:08:41

Are the instructions here https://github.com/bhauman/lein-figwheel/wiki/Node.js-development-with-figwheel still valid? Even though I’ve done npm install ws, I still get an error:

$ node target/server_out/node_main.js
Hello from the Node!

_/node_modules/ws/index.js:9
const WebSocket = require('./lib/WebSocket');
^^^^^
Figwheel: Can't start Figwheel!! Please make sure ws is installed
 do -> 'npm install ws' 

sashton18:08:34

project.clj:

:plugins [[lein-cljsbuild "1.1.7"]
            [lein-figwheel "0.5.13"]]

  :clean-targets ^{:protect false} ["target"]

  :cljsbuild {:builds
              [{:id "dev"
                :source-paths ["src"]
                :figwheel true
                :compiler {:main command-tools.node-main
                           :output-to "target/server_out/node_main.js"
                           :output-dir "target/server_out"
                           :target :nodejs
                           :optimizations :none
                           :source-map true}}]}

sashton18:08:34

forget what I said… I had an old node version installed