If you're running Windows 10 and developing Vue.js, React, Angular apps and sites or simply trying to install some project dependencies via NPM you may have been unfortunate enough to run into the following error in your command-line:

> 'find_dp0' not recognized as an internal or external command [...]

While I'm unsure what causes the error to occur in the first place, it was a tricky little bug to wrangle and bypass in order to get my app up and running before productivity ran out. After visiting various resources and forums and attempting numerous suggested fixes that worked for other members of the Node.js community, I managed to get the process working correctly for myself grabbing tidbits from here and there. This blog post is an attempt to help any other programmers who encounter this issue and hopefully save them some head-scratching and a couple hours of digging.

Step-by-step instructions:

  1. Located your GLOBAL node_modules folder and delete the packagelock.json file.
    • for me this was "C:\Program Files\nodejs"
  2. Open PowerShell as Admin and run the follow command:
    • > Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
  3. Clear your NPM cache:
    • > npm cache clear --force
  4. Install and use npm-windows-upgrade to upgrade NPM on Windows to the most latest version:
    • > yarn global add npm-windows-upgrade 
      > npm-windows-upgrade -p -v latest
  5. Install your dependencies USING YARN - in this case creating our initial React App. For some reason Yarn works better on Windows than NPM for installing dependencies (at least on my rig).
    • > yarn global add create-react-app
  6. In the case of this project, create your React app as normal:
    • > create-react-app appname

I hope this helps and best of luck!