title: How could the vue-cli-service crash because of the '@vue/cli-plugin-babel' module, if the node module is there?
body: <p><strong>Some background:</strong></p>
  
  <p>I started my project with <a href="https://github.com/SortableJS/Vue.Draggable" rel="nofollow noreferrer">a clone of this repository</a>. Here's <a href="https://sortablejs.github.io/Vue.Draggable/#/custom-clone" rel="nofollow noreferrer">an example of the code</a>. After some time, I realized that the vue-cli-service it used appeared to be old. (They even renamed it to '@vue/cli-service'). So, I ran npm update. The code has me use <code>npm run serve</code> to start the service. It's apparently equivalent to <code>npx vue-cli-service serve</code>. When I did that, it couldn't load some bootstrap stuff. I reinstalled bootstrap (<code>npm install bootstrap@version</code> (don't have access to the exact line I used). It then said it couldn't find '@vue/cli-plugin-babel'. I saw it right in the node_modules folder. </p>
  
  <p><strong>I fixed it using this process:</strong></p>
  
  <ol>
  <li>I ran <code>npm update</code>.</li>
  <li>It first said that it could not find a font (no longer have the specific details). The error directed to the bootstrap.css file.</li>
  <li>I reinstalled bootstrap. </li>
  <li>I run <code>npm run serve</code>, and it says "Cannot find module '@vue/cli-plugin-babel'"</li>
  <li>I see '@vue/cli-plugin-babel' <a href="https://imgur.com/a/vKsKbab" rel="nofollow noreferrer">showing in the node_modules folder</a></li>
  <li>I run <code>npm list --depth=0</code>, and '@vue/cli-plugin-babel' does not show up. 
  <a href="https://imgur.com/a/exHd3X6" rel="nofollow noreferrer">I*’m seeing this</a></li>
  <li><code>npm cache clean --force</code> alone did not cause the site to resume. It still said “ Cannot find module '@vue/cli-plugin-babel'”.</li>
  <li>Following <a href="https://stackoverflow.com/questions/20764881/why-does-npm-install-say-i-have-unmet-dependencies">the top SO answer here</a> got my site to work again.
  
  <ol>
  <li><code>rm -rf node_modules/</code></li>
  <li><code>npm cache clean</code> (then replaced with <code>npm cache verify</code> on npm's prompt)</li>
  <li><code>npm install</code> (I wonder if it was possible to ignore ‘rm -rf node_modules/’ and just do the last two steps).</li>
  </ol></li>
  <li>I run <code>npm run serve</code>, and the site works again. </li>
  <li>After running npm list --depth=0 again, <a href="https://imgur.com/a/ntjAQ2H" rel="nofollow noreferrer">there are no more UNMET DEPENDENCY issues, like with #6</a>. </li>
  </ol>
  
  <p>Also on that SO Q&amp;A, people talked about restructuring (reordering) the package.json file. In the top answer he says that a possible solution is to “Re-structure your package.json. Place all the high-level modules (serves as a dependency for others modules) at the bottom.”. I wonder if that relates to my issue.</p>
  
  <p><strong>My expected vs. actual results:</strong></p>
  
  <p>When I updated it, I actually sort of expected it to break. I got that. </p>
  
  <p>But what I also expected was:</p>
  
  <ol>
  <li>If the node module is there, it will not give me an error.</li>
  <li>If I run <code>npm install</code>, all dependencies will be handled automatically.</li>
  <li>If npm install doesn't do the trick, then <code>npm cache clean --force</code> should do the trick. (Note: I later learned about <code>npm cache verify</code>).</li>
  </ol>
  
  <p>I got:</p>
  
  <ol>
  <li>The '@vue/cli-plugin-babel' module was there <em>and</em> it gave an error saying it couldn't find it.</li>
  <li>(And also 3.) Running <code>npm install</code> and <code>npm install [unmet-dependency]</code> did not work until after 'rm -rf node_modules/' -> `npm verify cache' and THEN -> 'npm install'.</li>
  </ol>
  
  <p><strong>Here are my guesses:</strong></p>
  
  <ul>
  <li>@vue/cli service doesn’t check the folders directly to see if a module exists (75% chance it’s true)</li>
  <li>@vue/cli service uses a proxy, something like the packages.json file (but different) to see if a node exists (40%).</li>
  <li>@vue/cli service caches commonly used stuff. So, when I ran it again after the update, it didn’t check the new stuff in my folder, it checked its cache. It didn’t line up. (10%). </li>
  <li>For everything above, replace @vue/cli service with npm (10%).</li>
  </ul>
  
  <p>Again, my biggest question is <strong>"How could the vue-cli-service crash because of the '@vue/cli-plugin-babel' module, if the node module is there?"</strong> </p>
  
  <p>And <strong>"How did removing the node_modules folder, verifying the cache, and reinstalling with npm cause <code>npx vue-cli-service serve</code> to successfully run my site again (and find @vue/vue-plugin-babel)?"</strong>.</p>