title: How to obtain version in angular 5
body: <p>How i get version from <code>package.json</code> ?
  I have project angular 5
  Angular-Cli: <code>1.6.7</code> and npm <code>5.6.0</code></p>
  
  <p>My file enviroment.ts: </p>
  
  <pre><code>export const enviroment = {
      VERSION: require('../package.json').version 
    }
  </code></pre>
  
  <p>This file it is in <code>src/app/enviroment.ts</code></p>
  
  <p>The file package.json it is in <code>src/package.json</code></p>
  
  <p>When compile, the angular cannot found the file package.
  here is the error: </p>
  
  <blockquote>
    <p>Module not found: Error: Can't resolve '../package.json'</p>
  </blockquote>
  
  <p>I follow this answer, but no success
  <a href="https://stackoverflow.com/questions/34907682/how-to-display-app-version-in-angular2?utm_medium=organic&amp;utm_source=google_rich_qa&amp;utm_campaign=google_rich_qa">here</a></p>