Styleguide icon indicating copy to clipboard operation
Styleguide copied to clipboard

Uncaught TypeError: Cannot read property '0' of undefined

Open jamesryanbell opened this issue 8 years ago • 0 comments

Hi

I am receiving the following error when I have setup a new styleguide:

Uncaught TypeError: Cannot read property '0' of undefined
views.js:158

gulpfile.js

var styleguide = require('devbridge-styleguide');

gulp.task('start-styleguide', function () {

  styleguide.startServer();

  var liveServer = require("live-server");

  var params = {
      port: 8888, // Set the server port. Defaults to 8080.
      root: "./styleguide", // Set root directory that's being server. Defaults to cwd.
      open: false, // When false, it won't load your browser by default.
      file: "index.html", // When set, serve this file for every 404 (useful for single-page applications),
      mount: [['/components', '../node_modules']], // Mount a directory to a route.
      logLevel: 2, // 0 = errors only, 1 = some, 2 = lots
      middleware: [function(req, res, next) { next(); }] // Takes an array of Connect-compatible middleware that are injected into the server middleware stack
  };
  liveServer.start(params);
});

package.json

{
  "private": true,
  "scripts": {
    "prod": "gulp --production"
  },
  "devDependencies": {
    "bootstrap-sass": "^3.3.7",
    "devbridge-styleguide": "^0.4.17",
    "gulp": "^3.9.1",
    "jquery": "^3.1.0",
    "laravel-elixir": "^6.0.0-11",
    "laravel-elixir-browsersync-official": "^1.0.0",
    "laravel-elixir-vue-2": "^0.2.0",
    "laravel-elixir-webpack-official": "^1.0.2",
    "live-server": "^1.1.0",
    "lodash": "^4.16.2",
    "vue": "^2.0.1",
    "vue-resource": "^1.0.3"
  },
  "dependencies": {
    "ip": "^1.1.3",
    "request": "^2.75.0"
  }
}

Stats:

  • Node: 4.4.7
  • Npm: 3.9.6
  • Windows 7
  • Styleguide: 0.4.17

Thanks, James

jamesryanbell avatar Oct 19 '16 14:10 jamesryanbell