title: cross-env: Permission denied when deploy docker on container-optimized-os
body: <p>First I deployed my laravel project on google container-optimized-os.</p>
  
  <p>And I have created the build by running:</p>
  
  <pre class="lang-none prettyprint-override"><code>docker-compose up -d
  </code></pre>
  
  <p>After it has finished to go into app container and I run:</p>
  
  <pre class="lang-none prettyprint-override"><code>docker exec -it app bash
  </code></pre>
  
  <p>I then run:</p>
  
  <pre><code>npm install
  </code></pre>
  
  <p>and</p>
  
  <pre class="lang-none prettyprint-override"><code>npm run dev
  </code></pre>
  
  <p>and finally I get this error:</p>
  
  <blockquote>
    <pre class="lang-none prettyprint-override"><code>npm WARN npm npm does not support Node.js v10.19.0
  npm WARN npm You should probably upgrade to a newer version of node as we
  npm WARN npm can't make any promises that npm will work with this version.
  npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
  npm WARN npm You can find the latest version at https://nodejs.org/
  
  @ dev /var/www
  npm run development
  
  npm WARN npm npm does not support Node.js v10.19.0
  npm WARN npm You should probably upgrade to a newer version of node as we
  npm WARN npm can't make any promises that npm will work with this version.
  npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
  npm WARN npm You can find the latest version at https://nodejs.org/
  
  @ development /var/www
  cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
  
  sh: 1: cross-env: Permission denied
  npm ERR! code ELIFECYCLE
  npm ERR! errno 126
  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 126
  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!     /root/.npm/_logs/2020-05-10T15_35_07_179Z-debug.log
  npm ERR! code ELIFECYCLE
  npm ERR! errno 126
  npm ERR! @ dev: `npm run development`
  npm ERR! Exit status 126
  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!     /root/.npm/_logs/2020-05-10T15_35_07_203Z-debug.log
  </code></pre>
  </blockquote>
  
  <p>I copy <code>docker-compos.yml</code> and Dockerfile from <a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-laravel-nginx-and-mysql-with-docker-compose" rel="nofollow noreferrer">https://www.digitalocean.com/community/tutorials/how-to-set-up-laravel-nginx-and-mysql-with-docker-compose</a></p>
  
  <p>and edit Dockerfile for install nodejs and npm</p>
  
  <p>Thanks.</p>