Git Product home page Git Product logo

Comments (6)

davidtheclark avatar davidtheclark commented on June 25, 2024 1

Thanks for tracking down the Node 10 problem, @mourner. We'll look into alternatives. I'd love to avoid having to write a bunch of custom code for this (as budo does),and would also love to use a generic dependency instead of webpack-dev-server; but we're having trouble finding robust generic options that aren't (like browser-sync) way more than we need. And we have users who will protest strongly if we drop the live-reloading feature.

@kepta can you look into alternatives and figure out what looks best? We'd want to use the same thing for Batfish and for Underreact.

from batfish.

davidtheclark avatar davidtheclark commented on June 25, 2024 1

I think that we should revert to using browser-sync. Although it's an unnecessarily large dependency, we don't have a viable alternative. I will change the title of this issue to be specific about that.

from batfish.

kepta avatar kepta commented on June 25, 2024

I tried to find a perfect replacement for live-server, but it looks like there is no perfect solution.

We'll look into alternatives. I'd love to avoid having to write a bunch of custom code for this (as budo does),

@davidtheclark I am not sure if by ^^ you mean - budo authors choice to ditch tiny-lr see mattdesl/budo#194. From what I get reading the ticket and this code here, they ended up ditching tiny-lr but are still using the livereload script by injecting it in their HTML response.

I think a pragmatic solution would be to create a new package which uses tiny-lr and a static file server as a replacement for live-server. tiny-lr is quite popular and is used by big projects like gitbook , ember-cli, ionic, facebook/Docusaurus and even documentation.js. So I guess we can consider it to be fairly reliable.

One downside, also mentioned in mattdesl/budo#194, tiny-lr is a bit old and feature development is not very active.

What do you guys think?

from batfish.

davidtheclark avatar davidtheclark commented on June 25, 2024

@kepta How long do you think it would take to create a timeboxed proof of concept? That might be a place to start.

from batfish.

kepta avatar kepta commented on June 25, 2024

As per our last discussion, we have decided to move towards webpack-dev-server as a replacement for live-server. This might be easy for certain projects, but not exactly sure how much of a lift it would be for batfish.

from batfish.

jseppi avatar jseppi commented on June 25, 2024

Since yesterday, I have been seeing Error: Cannot find module 'opn' when running batfish build.

I get that error during the batfish build. I can reproduce consistently by running: rm -rf node_modules && npm install && npm run build

The error gets resolved if I do a second npm install and npm run build.

opn is a dependency of live-server, which is a dependency of batfish. It was happening a bunch yesterday, then stopped for a bit, and now it is back again.

I also tried adding opn directly to my project's package.json, which fixed that specific Cannot find module error, but then the same error happened for a different live-server dependency.

Edit: The Cannot find module errors happen on Node v6.11.1, but do not happen on Node v8.x

from batfish.

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.