Webpack was initialized using a configuration object that does not match the API schema


enter code herenpm test;

var webpackConfig = require('./webpack.test');
module.exports = function(config) {

    basePath: '',

    frameworks: ['jasmine'],

    files: [
      {pattern: './karma-shim.js', watched: false}


    exclude: [

    preprocessors: {
      './karma-shim.js': ['webpack']

   webpack: webpackConfig,
      "/app/": "http://localhost:3000/src/app"

    reporters: ['progress'],

    port: 9876,

    colors: true,

    logLevel: config.LOG_INFO,

    autoWatch: true,

    browsers: ['Chrome'],

    singleRun: false,

    concurrency: Infinity
module.exports = {
  devtool: 'cheap-module-eval-source-map',
  resolve: {
    extensions: ['','.ts','.js']

  module: {
    loaders: [
      //以.ts结尾的文件使用 TypeScript loader
      {test: /.ts$/,loader: 'awesome-typescript-loader'},
        loader: 'html'
        loader: 'null'
        loader: 'null'

then throws a BUG.

karma start karma.conf.js

keywords if/then/else require v5 option WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. - configuration.entry should be one of these: object { : string | [string] } | string | [string] The entry point(s) of the compilation. - configuration.resolve.extensions[0] should not be empty.

Can not load "webpack"!

First i don't see any entey point mentioned in config file which is required in order to webpack understand where to start from.

Second your resolve option in config file hase mentioned three types to resolve and first one is empty string which webpack don't like so by removing that empty string it should fix that problem

Hope this help you to fix the issue.