title: npm run dev won't come to an end
body: <p>I am trying to use vue in a laravel project. I followed the proper steps:</p>
  <ol>
  <li>i ran composer require laravel/ui</li>
  <li>i ran php artisan ui vue</li>
  <li>I included the  in my main layout file app.blade.php</li>
  <li>i ran npm run dev</li>
  </ol>
  <p>But when I go to my site, the component does not show and  I get an errormessage in the console of the browser:</p>
  <blockquote>
  <p>Uncaught ReferenceError: Vue is not defined</p>
  </blockquote>
  <p>Then after some searching I also noticed that &quot;npm run dev&quot; is not coming to an end in my cmd-window. It says :</p>
  <pre><code>DONE Compiled succesfully in 4465ms
  Your application is running here: http://localhost:8080
  </code></pre>
  <p>I can only stop it with Control-C.</p>
  <p>So my hypotheses is that vue is not defined in the browser because npm run dev does not end.</p>
  <p>I have going through all the steps of installing vue again, but no change.</p>
  <p>&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
  Clearly my package.json file is wrong. It looks like this:</p>
  <pre><code>{
  &quot;name&quot;: &quot;forum&quot;,
  &quot;version&quot;: &quot;1.0.0&quot;,
  &quot;description&quot;: &quot;Forum&quot;,
  &quot;author&quot;: &quot;Hubert van Dongen &lt;hmd19570@gmail.com&gt;&quot;,
  &quot;private&quot;: true,
  &quot;scripts&quot;: {
      &quot;dev&quot;: &quot;webpack-dev-server --inline --progress --config build/webpack.dev.conf.js&quot;,
      &quot;start&quot;: &quot;npm run dev&quot;,
      &quot;test&quot;: &quot;npm run unit&quot;,
      &quot;build&quot;: &quot;node build/build.js&quot;
  },
  &quot;dependencies&quot;: {
      &quot;vue&quot;: &quot;^2.5.2&quot;,
      &quot;vue-router&quot;: &quot;^3.0.1&quot;
  },
  &quot;devDependencies&quot;: {
      &quot;autoprefixer&quot;: &quot;^7.1.2&quot;,
      &quot;babel-core&quot;: &quot;^6.22.1&quot;,
      &quot;babel-helper-vue-jsx-merge-props&quot;: &quot;^2.0.3&quot;,
      &quot;babel-loader&quot;: &quot;^7.1.1&quot;,
      &quot;babel-plugin-syntax-jsx&quot;: &quot;^6.18.0&quot;,
      &quot;babel-plugin-transform-runtime&quot;: &quot;^6.22.0&quot;,
      &quot;babel-plugin-transform-vue-jsx&quot;: &quot;^3.5.0&quot;,
      &quot;babel-preset-env&quot;: &quot;^1.3.2&quot;,
      &quot;babel-preset-stage-2&quot;: &quot;^6.22.0&quot;,
      &quot;bootstrap&quot;: &quot;^4.0.0&quot;,
      &quot;chalk&quot;: &quot;^2.0.1&quot;,
      &quot;copy-webpack-plugin&quot;: &quot;^4.0.1&quot;,
      &quot;css-loader&quot;: &quot;^0.28.0&quot;,
      &quot;extract-text-webpack-plugin&quot;: &quot;^3.0.0&quot;,
      &quot;file-loader&quot;: &quot;^1.1.4&quot;,
      &quot;friendly-errors-webpack-plugin&quot;: &quot;^1.6.1&quot;,
      &quot;html-webpack-plugin&quot;: &quot;^2.30.1&quot;,
      &quot;jquery&quot;: &quot;^3.2&quot;,
      &quot;node-notifier&quot;: &quot;^5.1.2&quot;,
      &quot;optimize-css-assets-webpack-plugin&quot;: &quot;^3.2.0&quot;,
      &quot;ora&quot;: &quot;^1.2.0&quot;,
      &quot;popper.js&quot;: &quot;^1.12&quot;,
      &quot;portfinder&quot;: &quot;^1.0.13&quot;,
      &quot;postcss-import&quot;: &quot;^11.0.0&quot;,
      &quot;postcss-loader&quot;: &quot;^2.0.8&quot;,
      &quot;postcss-url&quot;: &quot;^7.2.1&quot;,
      &quot;resolve-url-loader&quot;: &quot;^2.3.1&quot;,
      &quot;rimraf&quot;: &quot;^2.6.0&quot;,
      &quot;sass&quot;: &quot;^1.20.1&quot;,
      &quot;sass-loader&quot;: &quot;^8.0.0&quot;,
      &quot;semver&quot;: &quot;^5.3.0&quot;,
      &quot;shelljs&quot;: &quot;^0.7.6&quot;,
      &quot;uglifyjs-webpack-plugin&quot;: &quot;^1.1.1&quot;,
      &quot;url-loader&quot;: &quot;^0.5.8&quot;,
      &quot;vue&quot;: &quot;^2.5.17&quot;,
      &quot;vue-loader&quot;: &quot;^13.3.0&quot;,
      &quot;vue-style-loader&quot;: &quot;^3.0.1&quot;,
      &quot;vue-template-compiler&quot;: &quot;^2.6.10&quot;,
      &quot;webpack&quot;: &quot;^3.6.0&quot;,
      &quot;webpack-bundle-analyzer&quot;: &quot;^2.9.0&quot;,
      &quot;webpack-dev-server&quot;: &quot;^2.9.1&quot;,
      &quot;webpack-merge&quot;: &quot;^4.1.0&quot;
  },
  &quot;engines&quot;: {
      &quot;node&quot;: &quot;&gt;= 6.0.0&quot;,
      &quot;npm&quot;: &quot;&gt;= 3.0.0&quot;
  },
  &quot;browserslist&quot;: [
      &quot;&gt; 1%&quot;,
      &quot;last 2 versions&quot;,
      &quot;not ie &lt;= 8&quot;
  ]
  </code></pre>
  <p>}</p>
  <p>What I did is create a new laravel project and copy the package.json file from that project to my forum project. It looks like this:</p>
  <pre><code>{
  &quot;private&quot;: true,
  &quot;scripts&quot;: {
      &quot;dev&quot;: &quot;npm run development&quot;,
      &quot;development&quot;: &quot;cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js&quot;,
      &quot;watch&quot;: &quot;npm run development -- --watch&quot;,
      &quot;watch-poll&quot;: &quot;npm run watch -- --watch-poll&quot;,
      &quot;hot&quot;: &quot;cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js&quot;,
      &quot;prod&quot;: &quot;npm run production&quot;,
      &quot;production&quot;: &quot;cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js&quot;
  },
  &quot;devDependencies&quot;: {
      &quot;axios&quot;: &quot;^0.19&quot;,
      &quot;cross-env&quot;: &quot;^7.0&quot;,
      &quot;laravel-mix&quot;: &quot;^5.0.1&quot;,
      &quot;lodash&quot;: &quot;^4.17.19&quot;,
      &quot;resolve-url-loader&quot;: &quot;^3.1.0&quot;,
      &quot;sass&quot;: &quot;^1.15.2&quot;,
      &quot;sass-loader&quot;: &quot;^8.0.0&quot;
  }
  </code></pre>
  <p>}</p>
  <p>I would expect that this package.json would run with npm run dev. However, when I run &quot;npm run dev&quot; from my forum-folder, I get a bunch of errors:</p>
  <pre><code>C:\xampp\htdocs\forum&gt;npm run dev
  
  &gt; @ dev C:\xampp\htdocs\forum
  &gt; npm run development
  
  
  &gt; @ development C:\xampp\htdocs\forum
  &gt; cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
  
  'cross-env' is not recognized as an internal or external command,
  operable program or batch file.
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
  npm ERR! Exit status 1
  npm ERR!
  npm ERR! Failed at the @ development script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     C:\Users\hmd\AppData\Roaming\npm-cache\_logs\2020-07-29T20_13_07_867Z-debug.log
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! @ dev: `npm run development`
  npm ERR! Exit status 1
  npm ERR!
  npm ERR! Failed at the @ dev script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     C:\Users\hmd\AppData\Roaming\npm-cache\_logs\2020-07-29T20_13_07_893Z-debug.log
  </code></pre>
  <p>&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
  I ran &quot;npm install --save-dev cross-env&quot; and  then again &quot;npm run dev&quot;. Result unfortunately:</p>
  <pre><code>C:\xampp\htdocs\forum&gt;npm run dev
  
  &gt; @ dev C:\xampp\htdocs\forum
  &gt; npm run development
  
  
  &gt; @ development C:\xampp\htdocs\forum
  &gt; cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
  
  The system cannot find the path specified.
  events.js:287
        throw er; // Unhandled 'error' event
        ^
  
  Error: spawn node_modules\webpack\bin\webpack.js ENOENT
      at notFoundError (C:\xampp\htdocs\forum\node_modules\←[4mcross-spawn←[24m\lib\enoent.js:6:26)
      at verifyENOENT (C:\xampp\htdocs\forum\node_modules\←[4mcross-spawn←[24m\lib\enoent.js:40:16)
      at ChildProcess.cp.emit (C:\xampp\htdocs\forum\node_modules\←[4mcross-spawn←[24m\lib\enoent.js:27:25)
  ←[90m    at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)←[39m
  Emitted 'error' event on ChildProcess instance at:
      at ChildProcess.cp.emit (C:\xampp\htdocs\forum\node_modules\←[4mcross-spawn←[24m\lib\enoent.js:30:37)
  ←[90m    at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)←[39m {
    code: ←[32m'ENOENT'←[39m,
    errno: ←[32m'ENOENT'←[39m,
    syscall: ←[32m'spawn node_modules\\webpack\\bin\\webpack.js'←[39m,
    path: ←[32m'node_modules\\webpack\\bin\\webpack.js'←[39m,
    spawnargs: [
      ←[32m'--progress'←[39m,
      ←[32m'--hide-modules'←[39m,
      ←[32m'--config=node_modules/laravel-mix/setup/webpack.config.js'←[39m
    ]
  }
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
  npm ERR! Exit status 1
  npm ERR!
  npm ERR! Failed at the @ development script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     C:\Users\hmd\AppData\Roaming\npm-cache\_logs\2020-07-30T19_26_43_340Z-debug.log
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! @ dev: `npm run development`
  npm ERR! Exit status 1
  npm ERR!
  npm ERR! Failed at the @ dev script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     C:\Users\hmd\AppData\Roaming\npm-cache\_logs\2020-07-30T19_26_43_370Z-debug.log
  </code></pre>
  <p>Any advice from people who know more about this than I do?</p>
  <p>HUbert</p>