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

Watch mode not working on Ubuntu #737

Closed
laurentpayot opened this issue Feb 1, 2021 · 2 comments
Closed

Watch mode not working on Ubuntu #737

laurentpayot opened this issue Feb 1, 2021 · 2 comments

Comments

@laurentpayot
Copy link

Watch mode issue #21 was closed but using the following example from the docs

require('esbuild').build({
  entryPoints: ['app.js'],
  outfile: 'out.js',
  bundle: true,
  watch: {
    onRebuild(error, result) {
      if (error) console.error('watch build failed:', error)
      else console.error('watch build succeeded:', result)
    },
  },
})

with

// app.js
console.log("Hello!")

I get the following error:

watch build failed: Error: The service was stopped
    at Socket.afterClose (/home/laurent/projects/myproject/node_modules/esbuild/lib/main.js:526:18)
    at Socket.emit (node:events:388:22)
    at endReadableNT (node:internal/streams/readable:1294:12)
    at processTicksAndRejections (node:internal/process/task_queues:80:21)

Without the watch option the output is generated without problem.

I'm using node 15.3.0 on my Ubuntu 20.10 PC.

@evanw
Copy link
Owner

evanw commented Feb 1, 2021

I'm guessing this is a duplicate of #730. Hopefully the problem is already fixed in the latest version that was just released. What version of esbuild are you using? The latest version is 0.8.39.

@laurentpayot
Copy link
Author

Oops yes looks like it's a duplicate of #730. I was using version 0.8.38. Just installed esbuild@0.8.39 and it worked like a charm. Thanks a lot!

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