title: Why can't I build this nuxtjs app inside docker, while local builds work?
body: <p>I'm developing this nuxtjs project on a Mac (all the latest and greatest) and local builds and generation work fine. I'm using <code>sass-loader</code> as a dev dependency, and my <code>nuxt.config.js</code> file is not very different from the default:</p>
  
  <pre><code>module.exports = {
    head: {
      title: 'temp-www',
      meta: [
        { charset: 'utf-8' },
        { name: 'viewport', content: 'width=device-width, initial-scale=1' },
        { hid: 'description', name: 'description', content: 'Nuxt.js project' }
      ],
      link: [
        { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
      ]
    },
    modules: [
      [ 'nuxt-fontawesome', {
        component: 'fa',
        imports: [
          { set: '@fortawesome/fontawesome-free-brands' },
        ]
      }],
    ],
    loading: { color: '#3B8070' },
    build: {
      extend (config, { isDev, isClient }) {
        if (isDev &amp;&amp; isClient) {
          config.module.rules.push({
            enforce: 'pre',
            test: /\.(js|vue)$/,
            loader: 'eslint-loader',
            exclude: /(node_modules)/
          })
        }
      }
    }
  }
  </code></pre>
  
  <p>I then created a <code>Dockerfile</code> like this</p>
  
  <pre><code>FROM node:stretch
  
  ENV NODE_ENV=production
  ENV HOST=0.0.0.0
  
  RUN mkdir -p /app
  COPY . /app
  WORKDIR /app
  
  EXPOSE 3000
  
  RUN npm install
  RUN npm run build
  CMD ["npm", "start"]
  </code></pre>
  
  <p>(and appropriate <code>.dockerignore</code>) but I get the following error while building the image.</p>
  
  <pre><code>ERROR in ./layouts/default.vue
  Module not found: Error: Can't resolve 'sass-loader' in '/app/layouts'
   @ ./layouts/default.vue 2:2-436
   @ ./.nuxt/App.js
   @ ./.nuxt/index.js
   @ ./.nuxt/client.js
  </code></pre>
  
  <p>In there, and in other <code>.vue</code> files, I use sass in a block like <code>&lt;style lang="scss"&gt;</code>. I tried changing that to <code>sass</code> but it makes no difference.</p>
  
  <p>Strangely, <a href="https://stackoverflow.com/questions/49735461/nuxtjs-sass-loader-build-with-sass-loader-scss-on-production">this question</a> says it should work by making <code>sass-loader</code> and <code>node-sass</code> as runtime deps, not devtime deps. I skeptically tried that, and it got worse, until I changed the <code>lang</code> attribute in the <code>style</code> blocks to <code>scss</code> instead of <code>sass</code>. In this case, and this case only, I got the image built correctly.</p>
  
  <p>What am I missing?</p>