How to fix webpack-dev-server not found
The bin/webpack-dev-server
command is not as smart as e.g. rails server
, where it shows the proper fix within the error message.
$ bin/webpack-dev-server
yarn run v1.19.1
error Command "webpack-dev-server" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Run yarn install --check-files
to fix this error.
Related cards:
How to fix "Command "webpack" not found"
I just ran into this deployment error after switching from the asset pipeline to webpack:
01:05 deploy:assets:precompile
01 bundle exec rake assets:precompile
01 Compiling...
01 Compilation failed:
01 yarn run v1.22.5
...
How to make changes to a Ruby gem (as a Rails developer)
At makandra, we've built a few gems over the years. Some of these are quite popular: spreewald (> 1M downloads), active_type (> 1M downloads), and geordi (> 200k downloads)
Developing a Ruby gem is different from developing Rails applications, w...
How to make Webpacker compile once for parallel tests, and only if necessary
Webpack is the future. We're using it in our latest Rails applications.
For tests, we want to compile assets like for production.
For parallel tests, we want to avoid 8 workers compiling the same files at the same time.
When assets did not change...
How to: Run webpack dev server with vcap.me
If your Rails application is using Webpack you need to serve assets on the same host as you application runs, otherwise you will see the following errors in your browser console:
[WDS] Disconnected!
Invalid Host header
So if you are usin...
Customize tokenization of the MySQL FULLTEXT parser
The way MySQL's FULLTEXT tokenizer splits text into word tokens might not always be what you need. E.g. it splits a word at period characters.
Since the tokenizer has near-zero configuration options (minimum word length and stopwords list), you n...
How to fix: Microphone recording levels are too quiet (or get lowered automatically)
If others on a call (Skype, SIP, ...) can not hear you loud enough, your volume levels are probably too low. Also, Skype may be changing your mixer levels.
Set a proper recording volume
- Open your mixer software (run
pavucontrol
). - Switc...
How to fix "Too many authentic authentication failures" with SSH and/or Capistrano
You are getting when connecting via SSH or deploying with Capistrano (which uses SSH):
Too many authentication failures for username
This is caused by having too many SSH keys added to your keyring or ssh-agent. Your ssh-agent will throw all...
Invoices: How to properly round and calculate totals
While it might seem trivial to implement an invoice that sums up items and shows net, gross and vat totals, it actually involves a lot of rules and caveats. It is very easy to create invoices where numbers don't add up and a few cents are missing....
How to fix: "unexpected token" error for JSON.parse
When using the json gem, you might run into this error when using JSON.parse
:
>> json = 'foo'.to_json
>> JSON.parse(json)
JSON::ParserError: 757: unexpected token at '"foo"'
from /.../gems/json-...
How to make Rational#to_s return strings without denominator 1 again
The way Rational#to_s
works on Ruby has changed from Ruby 1.9 on. Here is how to get the old behavior back.
You may want this for things where Rationals are being used, like when subtracting Date
objects from one another.