micro-dev icon indicating copy to clipboard operation
micro-dev copied to clipboard

Show friendly error if 'micro' peer dependency isn't met

Open bbbrrriiiaaannn opened this issue 6 years ago • 0 comments

I got too excited to use micro-dev and installed it without regarding the npm WARN about my unmet micro peer dependency. The resulting Cannot find module 'micro/lib' error didn't spark an immediate understanding of the fix.

This change validates the availability of micro, and provides a friendlier error if it's missing.

I'd meant to use micro-dev to simulate Now V2's routing (starting from this comment)—since this was only in a development context I hadn't made a point of installing micro too. Although my error required a a few willful missteps on my part, my mistakes feel like the sort that other devs getting comfortable with micro-dev could make.

bbbrrriiiaaannn avatar Feb 20 '19 21:02 bbbrrriiiaaannn