title: Uncaught Error: Cannot find module 'web/static/js/app' from '/'
body: <p>When trying to follow this tutorial : <a href="https://medium.com/@jespr/create-a-simple-chat-web-app-using-phoenix-and-vue-js-bc5d82e53f9b?fbclid=IwAR38QqXuBZd1V-04PPrA2sEOMPAEhetf2YgEVFMzzVUP_7vWMkjvAeeJtdQ" rel="nofollow noreferrer">Chat web-app using Phoenix and Vue.js — Part 1</a>, I'm stuck where I should see this message in the browser console </p>
  
  <blockquote>
    <p>Joined successfully Object {<strong>ob</strong>: Observer}</p>
  </blockquote>
  
  <p>I have follow every single instructions:</p>
  
  <ul>
  <li>Time to create the Phoenix project : <strong>SUCCESS</strong></li>
  <li>Let’s integrate Vue.js : <strong>SUCCESS</strong></li>
  <li>Time to initialize the Vue app and create our first component : <strong>SUCCESS</strong></li>
  <li>Vue.js and Phoenix sitting in a tree.. Time to hook these two up!: <strong>Whenever I run this command, I get</strong> </li>
  </ul>
  
  <blockquote>
    <p>app.js:61 Uncaught Error: Cannot find module 'web/static/js/app' from
    '/'
        at require (app.js:61)
        at browser.js:190</p>
  </blockquote>
  
  <p>I have tried everything I found on internet but still not able to do it</p>
  
  <p>Below are my code and file location in the project:</p>
  
  <p><strong>web/static/app.js</strong></p>
  
  <pre><code>import "phoenix_html"
  import socket from "/js/socket"
  </code></pre>
  
  <p><strong>web/static/js/socket.js</strong></p>
  
  <pre><code>import {Socket} from "phoenix"
  import Vue from 'vue'
  import MyApp from "../components/my-app.vue"
  
  let socket = new Socket("/socket", {params: {token: window.userToken}})
  socket.connect()
  
  // Create the main component
  Vue.component('my-app', MyApp)
  
  // And create the top-level view model:
  new Vue({
    el: '#app',
    render(createElement) {
      return createElement(MyApp, {})
    }
  });
  </code></pre>
  
  <p><strong>web/channels/room_channel.ex</strong></p>
  
  <pre><code>defmodule Vuechat.RoomChannel do
      use Vuechat.Web, :channel
  
      def join("room:lobby", payload, socket) do
          {:ok, socket}
      end
  
      def join("room:" &lt;&gt; _private_room_id, _params, _socket) do
          {:error, %{reason: "Unauthorized"}}
      end
  
      def handle_in("new_msg", %{"body" =&gt; body}, socket) do
          broadcast! socket, "new_msg", %{body: body}
          {:noreply, socket}
      end
  
      def handle_out("new_msg", payload, socket) do
          push socket, "new_msg", payload
          {:noreply, socket}
      end
  end
  </code></pre>
  
  <p>Does anyone have a solution on this ?</p>