Skip to content

Instantly share code, notes, and snippets.

@cesasol
Created October 10, 2018 23:13
Show Gist options
  • Save cesasol/d57731cd767c47eb414a6b0a94714269 to your computer and use it in GitHub Desktop.
Save cesasol/d57731cd767c47eb414a6b0a94714269 to your computer and use it in GitHub Desktop.
pnpm install solver
#!/bin/sh
# This is a simple hack to fix the pnpm module resolution, if you encounter "Module not found" in some deep dependency of your
# project, then use this script to add those not founded dependencies as a direct dev dependency.
# All credit goes to flaviut https://github.com/pnpm/pnpm/issues/1261
while true; do pnpm install -D $(pnpm start 2>&1 | grep 'Error: Cannot find module' | sed "s/Error: Cannot find module '\([a-z.-]\+\)'/\1/g"); done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment