zouhir / lqip

Low Quality Image Placeholders (LQIP) Module for Node
433 stars 30 forks source link

Errors with nuxt-js #21

Open smitpatelx opened 4 years ago

smitpatelx commented 4 years ago

Describe the bug Hey I am using @nuxt/content module with @aceforth/nuxt-optimized-images. I am facing this error and its caused due to nuxt-optimized-images.

myproject/node_modules/lqip/index.js:76
  throw up;
  ^

TypeError: Cannot read property 'length' of undefined
    at WebSocket.setSocket (myproject/node_modules/@nuxt/content/node_modules/ws/lib/websocket.js:162:14)
    at WebSocketServer.completeUpgrade (myproject/node_modules/@nuxt/content/node_modules/ws/lib/websocket-server.js:322:8)
    at WebSocketServer.handleUpgrade (myproject/node_modules/@nuxt/content/node_modules/ws/lib/websocket-server.js:245:10)
    at WS.handleUpgrade (myproject/node_modules/@nuxt/content/lib/ws.js:21:21)
    at WS.serve (myproject/node_modules/@nuxt/content/lib/ws.js:17:10)
    at myproject/node_modules/@nuxt/content/lib/middleware.js:12:15
    at call (myproject/node_modules/connect/index.js:239:7)
    at next (myproject/node_modules/connect/index.js:183:5)
    at next (myproject/node_modules/connect/index.js:161:14)
    at WebpackBundler.middleware (myproject/node_modules/@nuxt/webpack/dist/webpack.js:5595:5)
[nodemon] app crashed - waiting for file changes before starting...

To Reproduce Steps to reproduce the behavior:

  1. Install @aceforth/nuxt-optimized-images
  2. Install lqip-loader
  3. Install @nuxt/content

Expected behavior This error occur during build process. Expected everything to go smooth.

Desktop (please complete the following information):