“Module not found” error with Gatsby, Netlify CMS, and PostCSS→
Your site uses Gatsby and Netlify CMS. Tailwind and PostCSS take care of the styling. You run gatsby develop
, and encounter a cryptic error message.
Your site uses Gatsby and Netlify CMS. Tailwind and PostCSS take care of the styling. You run gatsby develop
, and encounter a cryptic error message.
Migrate is a very useful migration framework for Node. Unfortunately, its documentation is lacking in places. Here are a couple of handy options not covered by the README.
sudo -u <user> <command>
doesn't inherit the user's environment. Here's how to fix that.
Type guards let you provide TypeScript with more information about a variable's type. Type guards are especially useful when working with a variable which may be undefined
.
Chai lets you assert that some code throws an error. The key is to pass the test subject to expect
, not the test result.
You can disable ESLint for a single line, a block of code, or an entire file. Wherever possible, specify the rule or rules you wish to disable.
Don't use "deep equals" when comparing arrays with Chai; it depends on element order. Examine the array members instead.
How to find documents according to the size of an array field.
TypeScript's strict type checking can cause problems when working with numeric environment variables. Here's a solution.
VS Code has the concept of code actions. When a code action is available, VS Code displays a small lightbulb icon nearby 💡. Clicking on the lightbulb displays a list of available actions.