Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Cannot read property '0' of undefined #197

Open
jamesryanbell opened this issue Oct 19, 2016 · 0 comments
Open

Uncaught TypeError: Cannot read property '0' of undefined #197

jamesryanbell opened this issue Oct 19, 2016 · 0 comments

Comments

@jamesryanbell
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant