Giter VIP home page Giter VIP logo

Comments (13)

reiwa avatar reiwa commented on May 21, 2024 7

There is an output "Restarted!", But it is not functioning. I'm using node v8.2.0 on latest macOS.

from micro-dev.

leo avatar leo commented on May 21, 2024 1

Should be fixed in #29. Releasing soon!

from micro-dev.

tungv avatar tungv commented on May 21, 2024 1

this PR #34 should fix the problem @zigomir stated

from micro-dev.

zigomir avatar zigomir commented on May 21, 2024

@leo can't you reproduce it with holding cmd + s for few seconds? I can reproduce it this way ever time.

from micro-dev.

leo avatar leo commented on May 21, 2024

@zigomir That doesn't sound like a real-world scenario. The system might be suffering if the file is being updated too fast. In turn, we might have to implement a threshold.

from micro-dev.

zigomir avatar zigomir commented on May 21, 2024

This reproduction is not real-world, but I also get same issue whenever I "normally" edit my code when editor saves whenever I cmd + tab to other windows etc.

from micro-dev.

tungv avatar tungv commented on May 21, 2024

I might be experiencing the same issue.

When I tried to log toDelete, I got the relative paths (for example src/abc.js or build/abc.js). I don't believe require.resolve(item) can resolve those paths. In fact, it always threw and continue. Thus, delete command after that never ran.

I'm using node 8.2.1

I'm pretty sure hot reload is reliably not working at all (at least on node 8.2.1) and I made a PR attempting to fix this #29

from micro-dev.

tungv avatar tungv commented on May 21, 2024

@zigomir I can't reproduce your reported situation. can you create a git repo that can reproduce it?

from micro-dev.

zigomir avatar zigomir commented on May 21, 2024

@tungv

echo 'exports.default = (req, res) => {
  res.end(`test`)
}' >> index.js

echo '{
  "name": "micro-dev-restart-issue",
  "main": "index.js",
  "scripts": {
    "dev": "micro-dev"
  },
  "devDependencies": {
    "micro-dev": "^1.2.2"
  }
}' >> package.json

npm install

most easily reproducible with vscode editor, but I can still reproduce using vim.

from micro-dev.

tungv avatar tungv commented on May 21, 2024

I tried to edit it in atom/vscode and it worked very well

image

from micro-dev.

zigomir avatar zigomir commented on May 21, 2024

For sure it works for one change. Try making more, up to 10+ saves. It always stops working after few saves for me.

from micro-dev.

tungv avatar tungv commented on May 21, 2024

now I can reproduce the behavior (10+ continuous saves) in vscode and atom. I think until this is fixed, the best way is not to hit cmd+s that often 😺

from micro-dev.

tungv avatar tungv commented on May 21, 2024

I think I figured out what was wrong. Will make a PR when I get to my laptop

from micro-dev.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.