Comments (6)
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.
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.
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.
@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.
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.
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)
- How to use "browser" package.json field in static (Node) build? HOT 2
- Delete from output directory files that are not relics of the build HOT 1
- iOS Browser Issues HOT 1
- Trailing spaces causing markdown formatting issues HOT 4
- Incorrect validation error with `uglify: false` on `inlineJs` object
- prefixUrlAbsolute is hard to use with pathnames that include siteBasePath HOT 1
- JSON files aren't added to outputDirectory in v1.9.7 HOT 1
- heap out of memory error on Linux
- "batfish build" freezes on "Processing files for static HTML" stage HOT 1
- Replace Autoprefixer browsers option to Browserslist config HOT 2
- Could we check if a hash link is on current page before routing?
- JavaScript heap out of memory HOT 1
- Processing files for static HTML is killed HOT 2
- Upgrade to Node 10
- v2 breaks in watch mode
- Make the site URL color more legible
- Identifier 'X' has already been declared
- Network port automatically selected not shown in console messages
- Doesn't support import assertions.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from batfish.