alexmingoia / pux-starter-app

Starter Pux app w/ hot-reloading and isomorphic routing and rendering
https://www.purescript-pux.org
BSD 3-Clause "New" or "Revised" License
101 stars 39 forks source link

File changes no longer trigger recompilation #28

Closed srid closed 7 years ago

srid commented 7 years ago

This used to work, but not anymore. File changes are not picked by up npm start and no re-compilation is being triggered. Scrolling up the terminal I notice Error: purs-loader failed which seems to be relevant.

The workaround is to Ctrl+C and run npm start again, but this is painful due to the slowness of the whole process (takes 5-10 seconds).

ERROR in ./src/Layout.purs
Module build failed: Error: compilation failed
    at ChildProcess.<anonymous> (/Users/srid/Projects/Pallanguzhi/node_modules/purs-loader/lib/Psc.js:48:16)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:885:16)
    at Socket.<anonymous> (internal/child_process.js:334:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:501:12)
 @ ./support/index.js 2:19-48
 @ multi main

ERROR in ./src/Main.purs
Module build failed: Error: purs-loader failed
    at /Users/srid/Projects/Pallanguzhi/node_modules/purs-loader/lib/index.js:141:32
    at Array.forEach (native)
    at /Users/srid/Projects/Pallanguzhi/node_modules/purs-loader/lib/index.js:140:31
    at tryCatcher (/Users/srid/Projects/Pallanguzhi/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/srid/Projects/Pallanguzhi/node_modules/bluebird/js/release/promise.js:510:31)
    at Promise._settlePromise (/Users/srid/Projects/Pallanguzhi/node_modules/bluebird/js/release/promise.js:567:18)
    at Promise._settlePromise0 (/Users/srid/Projects/Pallanguzhi/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/Users/srid/Projects/Pallanguzhi/node_modules/bluebird/js/release/promise.js:687:18)
    at Async._drainQueue (/Users/srid/Projects/Pallanguzhi/node_modules/bluebird/js/release/async.js:138:16)
    at Async._drainQueues (/Users/srid/Projects/Pallanguzhi/node_modules/bluebird/js/release/async.js:148:10)
    at Immediate.Async.drainQueues (/Users/srid/Projects/Pallanguzhi/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:649:20)
    at tryOnImmediate (timers.js:622:5)
    at processImmediate [as _immediateCallback] (timers.js:594:5)
 @ ./support/index.js 1:11-38
 @ multi main
srid commented 7 years ago

I can't explain how but I think this is related to https://github.com/nwolverson/vscode-ide-purescript/issues/22#issuecomment-238060475 - as doing the workaround in that linked comment resolves this issue for most part.

alexmingoia commented 7 years ago

This should be fixed in the newest pux/pux-starter-app version.