title: Can't connect to Radis server in node-client using Docker
body: <p>I'm new to this field so, I will very much appreciate your help<br>
  I was trying to use <em>Redis</em> with my <em>VueJs</em> frontend project, and I installed <em>node-redis</em> npm package.
  Also, I'm using Docker to try to point redis image with my docker node image.<br><br>
  But, I had got this error at my browser console:<br> <code>Uncaught (in promise) TypeError: net.connect is not a function</code>
  <a href="https://i.stack.imgur.com/itBEY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/itBEY.png" alt="enter image description here" /></a>
  <br></p>
  <p>This's <strong>redis.js</strong> file</p>
  <pre><code>const redis = require('redis');
  const redisClient = redis.createClient();
  
  (async () =&gt; {
    redisClient.on(&quot;connect&quot;, () =&gt; console.log(&quot;Redis Client connected&quot;));
  
    await redisClient.connect();
    await redisClient.set(&quot;hello&quot;, &quot;world&quot;);
  })();
  </code></pre>
  <p>This's <strong>vue.config.js</strong> file</p>
  <pre><code>const webpack = require(&quot;webpack&quot;)
  
  module.exports = {
      transpileDependencies: true,
      configureWebpack: {
          devtool: 'source-map',
          plugins: [
              new webpack.ProvidePlugin({
                  process: 'process/browser',
                  Buffer: ['buffer', 'Buffer']
              }),
          ],
          resolve: {
              fallback: {
                  path: require.resolve(&quot;path-browserify&quot;),
                  crypto: require.resolve(&quot;crypto-browserify&quot;),
                  url: require.resolve(&quot;url&quot;),
                  net: require.resolve(&quot;net&quot;),
                  tls: require.resolve(&quot;tls&quot;),
                  util: require.resolve(&quot;util&quot;),
                  buffer: require.resolve(&quot;buffer&quot;),
                  Buffer: require.resolve(&quot;buffer&quot;),
                  assert: require.resolve('assert'),
                  http: require.resolve('stream-http'),
                  https: require.resolve('https-browserify'),
                  stream: require.resolve('stream-browserify'),
              },
          },
      },
      devServer: {
          allowedHosts: &quot;all&quot;, // webpack v4 or higher
          compress: true,
          port: 80
      }
  }
  </code></pre>
  <p>This's <strong>package.json</strong> file</p>
  <pre><code>{
    &quot;name&quot;: &quot;6lb-menu&quot;,
    &quot;version&quot;: &quot;0.1.1&quot;,
    &quot;private&quot;: true,
    &quot;scripts&quot;: {
      &quot;serve&quot;: &quot;vue-cli-service serve&quot;,
      &quot;build&quot;: &quot;vue-cli-service build&quot;,
      &quot;lint&quot;: &quot;vue-cli-service lint&quot;
    },
    &quot;dependencies&quot;: {
      &quot;@diracleo/vue-enlargeable-image&quot;: &quot;0.0.7&quot;,
      &quot;@webzlodimir/vue-bottom-sheet&quot;: &quot;^1.3.0&quot;,
      &quot;axios&quot;: &quot;^0.27.2&quot;,
      &quot;luxon&quot;: &quot;^1.28.0&quot;,
      &quot;masonry-layout&quot;: &quot;^4.2.2&quot;,
      &quot;moment&quot;: &quot;^2.29.4&quot;,
      &quot;redis&quot;: &quot;^4.3.0&quot;,
      &quot;regenerator-runtime&quot;: &quot;^0.13.9&quot;,
      &quot;tslib&quot;: &quot;^2.4.0&quot;,
      &quot;vue&quot;: &quot;^2.7.8&quot;,
      &quot;vue-datetime&quot;: &quot;^1.0.0-beta.14&quot;,
      &quot;vue-i18n&quot;: &quot;^8.27.2&quot;,
      &quot;vue-inline-svg&quot;: &quot;^2.1.0&quot;,
      &quot;vue-lazyload&quot;: &quot;^1.3.3&quot;,
      &quot;vue-property-decorator&quot;: &quot;^8.4.2&quot;,
      &quot;vue-router&quot;: &quot;^3.6.3&quot;,
      &quot;vue-wow&quot;: &quot;^1.2.0&quot;,
      &quot;vuebar&quot;: &quot;0.0.20&quot;,
      &quot;vuetify&quot;: &quot;^2.6.9&quot;,
      &quot;vuex&quot;: &quot;^3.4.0&quot;,
      &quot;weekstart&quot;: &quot;^1.1.0&quot;,
      &quot;wicg-inert&quot;: &quot;^3.1.2&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@vue/cli-plugin-typescript&quot;: &quot;^5.0.8&quot;,
      &quot;@vue/cli-service&quot;: &quot;^5.0.8&quot;,
      &quot;assert&quot;: &quot;^2.0.0&quot;,
      &quot;buffer&quot;: &quot;^6.0.3&quot;,
      &quot;crypto-browserify&quot;: &quot;^3.12.0&quot;,
      &quot;https-browserify&quot;: &quot;^1.0.0&quot;,
      &quot;path-browserify&quot;: &quot;^1.0.1&quot;,
      &quot;process&quot;: &quot;^0.11.10&quot;,
      &quot;sass&quot;: &quot;^1.54.5&quot;,
      &quot;sass-loader&quot;: &quot;^13.0.2&quot;,
      &quot;stream-browserify&quot;: &quot;^3.0.0&quot;,
      &quot;stream-http&quot;: &quot;^3.2.0&quot;,
      &quot;tls&quot;: &quot;0.0.1&quot;,
      &quot;typescript&quot;: &quot;^4.7.4&quot;,
      &quot;url&quot;: &quot;^0.11.0&quot;,
      &quot;net&quot;: &quot;^1.0.2&quot;,
      &quot;util&quot;: &quot;^0.12.4&quot;,
      &quot;vue-template-compiler&quot;: &quot;^2.7.10&quot;,
      &quot;webpack&quot;: &quot;^5.74.0&quot;
    },
    &quot;browserslist&quot;: [
      &quot;&gt; 1%&quot;,
      &quot;last 2 versions&quot;,
      &quot;not dead&quot;
    ]
  }
  </code></pre>
  <p>This's <strong>docker-compose.yml</strong></p>
  <pre><code>version: '3.9'
  
  services:
  
    # NPM service
    6lbui_npm:
      build:
        context: .
        dockerfile: node.dockerfile
      container_name: 6lbui_npm
      restart: always
      ports:
        - &quot;${LISTEN_IP}:${HTTP_NPM_PORT}:80&quot;
      volumes:
        - ../app/:/usr/src/app:delegated
      networks:
        - network
  
    # Redis caching service
    6lbui_redis:
      image: redis:7.0
      container_name: 6lbui_redis
      restart: always
      expose:
        - 6379
      networks:
        - network
  
  networks:
    network:
      driver: bridge
      driver_opts:
        com.docker.network.bridge.host_binding_ipv4: &quot;${LISTEN_IP}&quot;
  </code></pre>
  <p>Any suggestion if I walk in the correct way, instead of please suggest a way to use <em>redis</em> with my <em>VueJs client</em> project.<br>
  Thanks</p>