title: Cannot find module '@rails/ujs' - Rails 6 Webpack App
body: <p>I have these errors in a Rails 6 app and all javascript is not working:</p>
  
  <pre><code>ERROR in ./app/javascript/packs/application.js
  Module not found: Error: Can't resolve '@rails/activestorage' in '/Users/jrsahuquillo/Dropbox/myappname/app/javascript/packs'
   @ ./app/javascript/packs/application.js 9:0-31
  
  ERROR in ./app/javascript/packs/application.js
  Module not found: Error: Can't resolve '@rails/ujs' in '/Users/jrsahuquillo/Dropbox/myappname/app/javascript/packs'
   @ ./app/javascript/packs/application.js 5:0-21
  </code></pre>
  
  <p>My <code>package.json</code> is:</p>
  
  <pre><code>{
    "name": "myappname",
    "private": true,
    "dependencies": {
      "@rails/actioncable": "^6.0.0-alpha",
      "@rails/activestorage": "^6.0.2",
      "@rails/ujs": "^6.0.2",
      "@rails/webpacker": "4.2.0",
      "bootstrap": "^4.4.1",
      "jquery": "^3.4.1",
      "jquery-ui": "^1.12.1",
      "jquery-ui-dist": "^1.12.1",
      "popper.js": "^1.16.0",
      "serialize-javascript": "2.1.2",
      "turbolinks": "^5.2.0"
    },
    "version": "0.1.0",
    "devDependencies": {
      "webpack-dev-server": "^3.8.0"
    },
    "optionalDependencies": {
      "fsevents": "2.0.0"
    }
  }
  </code></pre>
  
  <p>In <code>application.js</code>:</p>
  
  <pre><code>require("@rails/ujs").start();
  require("turbolinks").start();
  require("@rails/activestorage").start();
  require("channels");
  require("bootstrap/dist/js/bootstrap");
  </code></pre>
  
  <p>In <code>app/views/layouts/application.html.erb</code>:</p>
  
  <pre><code>&lt;%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %&gt;
  &lt;%= stylesheet_pack_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %&gt;
  &lt;%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %&gt;
  </code></pre>
  
  <p>It was working ok, but I don´t know when and why it left working.
  Could someone help me?</p>