elm-analyse icon indicating copy to clipboard operation
elm-analyse copied to clipboard

Update node-watch so recursive watch is enabled on linux

Open laurentpayot opened this issue 4 years ago • 0 comments

platform: Linux (Ubuntu 20.04 LTS) node version: 14.12.0 elm-analyse version: 0.16.5

If I run % elm-analyse -s I get:

Elm Analyser server starting with config:
{
  port: 3000,
  elmFormatPath: 'elm-format',
  format: 'human',
  open: false
}
fs.js:1471
    throw new ERR_FEATURE_UNAVAILABLE_ON_PLATFORM('watch recursively');
    ^

TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
    at Object.watch (fs.js:1471:11)
    at hasNativeRecursive (/home/laurent/projects/myproject/node_modules/node-watch/lib/has-native-recursive.js:82:20)
    at Watcher.watchDirectory (/home/laurent/projects/myproject/node_modules/node-watch/lib/watch.js:301:3)
    at watch (/home/laurent/projects/myproject/node_modules/node-watch/lib/watch.js:403:13)
    at /home/laurent/projects/myproject/node_modules/node-watch/lib/watch.js:365:15
    at Array.map (<anonymous>)
    at watch (/home/laurent/projects/myproject/node_modules/node-watch/lib/watch.js:364:41)
    at Object.run (/home/laurent/projects/myproject/node_modules/elm-analyse/dist/app/server/watcher.js:14:5)
    at /home/laurent/projects/myproject/node_modules/elm-analyse/dist/app/server/app.js:34:27
    at /home/laurent/projects/myproject/node_modules/elm-analyse/dist/app/server/worker.js:30:9 {
  code: 'ERR_FEATURE_UNAVAILABLE_ON_PLATFORM'
}

I fixed this by updating node-watch to the latest version:

cd node_modules/elm-analyse && npm i [email protected]

laurentpayot avatar Oct 04 '20 16:10 laurentpayot