title: Stuck at page 52 of Web Application Development with Yii 2 and PHP
body: <p>Hi got to page 52 and I am getting an exception trying to view the customers/add route.</p>
  
  <p>I managed to fix it by creating a soft link - but why should I need to and is this the correct way to fix it or has the book become out-of-sync with the yii code-base</p>
  
  <p>I checked the errata and applied the fix suggested (and also what is in the example download book code)</p>
  
  <p>I know books go out of date - but this is the error I am getting</p>
  
  <pre><code>PHP User Error – yii\base\ErrorException
  
  Exception 'yii\base\InvalidParamException' with message 'The file or directory to be published does not exist: /var/www/html/crmapp/vendor/bower/jquery/dist' 
  
  in /var/www/html/crmapp/vendor/yiisoft/yii2/web/AssetManager.php:385
  ...
  </code></pre>
  
  <p>Now the bower directory is not on my machine even though I followed all the composer instructions to install stuff so far I have</p>
  
  <pre><code>[adrian@eagle:/var/www/html/crmapp]$ ls vendor/bower-asset/jquery/dist/
  jquery.js  jquery.min.js  jquery.min.map
  [adrian@eagle:/var/www/html/crmapp]$
  </code></pre>
  
  <p>Ok I managed to fix it by creating a soft-link</p>
  
  <pre><code>[adrian@eagle:/var/www/html/crmapp]$ ls -l vendor/
  total 64
  -rw-rw-r-- 1 adrian adrian  183 Jan  6 21:19 autoload.php
  drwxrwxr-x 2 adrian adrian 4096 Jan  6 21:19 bin
  lrwxrwxrwx 1 adrian adrian   12 Jan 12 19:28 bower -&gt; bower-asset/
  drwxrwxr-x 6 adrian adrian 4096 Jan  6 21:19 bower-asset
  drwxrwxr-x 3 adrian adrian 4096 Jan  6 21:19 cebe
  </code></pre>
  
  <p>Book:
  <a href="https://www.packtpub.com/web-development/web-application-development-yii-2-and-php" rel="nofollow">https://www.packtpub.com/web-development/web-application-development-yii-2-and-php</a></p>