nikku / karma-browserify

A fast Browserify integration for Karma that handles large projects with ease
MIT License
321 stars 49 forks source link

[framework.browserify]: Error: ENOTDIR: not a directory, stat #179

Closed karneaud closed 8 years ago

karneaud commented 8 years ago

I'm trying to setup a karma/ jasmine ttd into my project and get the above subject error

the following is my package.json

....
  "devDependencies": {
    "babelify": "^6.1.3",
    "browser-sync": "^2.8.0",
    "browserify": "^11.0.0",
    "del": "^1.2.0",
    "exorcist": "^0.4.0",
    "gulp": "^3.9.0",
    "gulp-buffer": "0.0.2",
    "gulp-if": "^1.2.5",
    "gulp-karma": "*",
    "gulp-uglify": "^1.2.0",
    "gulp-util": "^3.0.6",
    "jasmine": "*",
    "karma": "*",
    "karma-browserify": "^5.0.3",
    "karma-chrome-launcher": "^0.2.3",
    "karma-jasmine": "*",
    "vinyl-source-stream": "^1.1.0",
    "watchify": "^3.7.0",
    "yargs": "^3.16.1"
  },
  "dependencies": {
    "phaser": "^2.4.1"
  },
  "browserify": {
    "transform": [
      "babelify"
    ]
  }
}

My karma.conf.js

module.exports = function(config) {
  config.set({
    basePath: "./",
    browsers: ['Chrome'],
    frameworks: ['browserify','jasmine'],
    files: [
      'src/**/*.js',
      'tests/**/*.spec.js'
    ],
    port: 3000,
    colors: true,
    logLevel: config.LOG_INFO,
    autoWatch: true,
    singleRun: true,
    failOnEmptyTestSuite: false,
    preprocessors: {
      'src/**/*.js': ['browserify'],
      'tests/**/*.js': ['browserify']
    },
    browserify: {
        debug: true,
        transform: [ 'babelify' ]
    }
  });
};

The logs

05 04 2016 21:16:38.567:ERROR [framework.browserify]: bundle error 05 04 2016 21:16:38.568:ERROR [framework.browserify]: Error: ENOTDIR: not a directory, stat '/Applications/Atom.app/Contents/Resources/app.asar/exports/states/GameStateInit'

The directory is wrong and doesn't lead to the project's directory.

I'm new to karma so I'm not sure what to look for. What does the error message suggest?

nikku commented 8 years ago

A few observations: