Skip to content

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

Open
bbbrrriiiaaannn wants to merge 1 commit into
vercel:mainfrom
bbbrrriiiaaannn:check-micro-peer-dependency
Open

Show friendly error if 'micro' peer dependency isn't met#96
bbbrrriiiaaannn wants to merge 1 commit into
vercel:mainfrom
bbbrrriiiaaannn:check-micro-peer-dependency

Conversation

@bbbrrriiiaaannn

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant