title: "E/launcher - Error: TypeError: module is not a function" protractor testing
body: <p>I'm having trouble getting my protractor tests configured. </p>
  
  <p>I get the following error:</p>
  
  <pre><code>| 304 =&gt; protractor src/test/protractor.conf.js
  [11:22:52] I/launcher - Running 1 instances of WebDriver
  [11:22:52] I/local - Starting selenium standalone server...
  [11:22:52] I/local - Selenium standalone server started at             
  http://10.0.0.89:53657/wd/hub
  [11:22:53] E/launcher - Error: TypeError: module is not a function
      at Suite.&lt;anonymous&gt; (/Users/sms97admin/Bolt/ng-    
  bolt/src/test/components/textfieldTODO.mocha.js:11:16)
      at Object.create     
  (/usr/local/lib/node_modules/mocha/lib/interfaces/common.js:114:19)
      at context.describe.context.context     
  (/usr/local/lib/node_modules/mocha/lib/interfaces/bdd.js:44:27)
      at Object.&lt;anonymous&gt; (/Users/sms97admin/Bolt/ng-
  bolt/src/test/components/textfieldTODO.mocha.js:2:1)
      at Module._compile (module.js:570:32)
      at Object.Module._extensions..js (module.js:579:10)
      at Module.load (module.js:487:32)
      at tryModuleLoad (module.js:446:12)
      at Function.Module._load (module.js:438:3)
      at Module.require (module.js:497:17)
  [11:22:53] E/launcher - Process exited with error code 100
  </code></pre>
  
  <p>Spec File:</p>
  
  <pre><code>'use strict';
  describe('Textfield still needs testing', function() {
  
  beforeEach(function() {
      angular.module('blt_config', []);
      angular.module('blt_dataRoutes', []);
      angular.module('blt_appProfile', []);
      angular.module('blt_appViews', []);
  });
  
  beforeEach(module('blt_core', function($provide) {
      $provide.value('config', { defaultLogLevel: "error", debug: true });
  }));
  
  beforeEach(module('truncate'));
  beforeEach(module('blt_textfield'));
  beforeEach(module('templates'));
  
  var element;
  var outerScope;
  var innerScope;
  
  beforeEach(inject(function($rootScope, $compile) {
      element = angular.element('&lt;form&gt;&lt;blt-textfield ' +
          'data-model="value" ' +
          'data-name="{{name}}" ' +
          'data-label="{{label}}" ' +
      '&gt;&lt;/blt-textfield&gt;&lt;/form&gt;');
  
      outerScope = $rootScope;
      $compile(element)(outerScope);
  
      innerScope = element.isolateScope();
      outerScope.$digest();
  }));
  
  describe('misc tests', function() {
  
      it.only('has to pass', function() {
          expect(12).to.equal(12);
      });
  });
  </code></pre>
  
  <p>Karma Config:</p>
  
  <pre><code>module.exports = function(config) {
  config.set({
      basePath: '../',
      files: [
          // Dependencies
          '../node_modules/angular/angular.js',
          '../node_modules/angular-route/angular-route.js',
          '../node_modules/angular-mocks/angular-mocks.js',
          '../node_modules/angular-truncate-2/src/angular-truncate-2.js',
          '../node_modules/angular-animate/angular-animate.js',
  
          // Load Definitions
          // NOTE: These Must Load First
          'core/js/ng-bolt.js',
          'core/js/core.module.js',
          'components/datepicker/datepicker.module.js',
          'components/view/view.module.js',
  
          // Load All Other Files
          'core/js/**.js',
          'components/**/*.js',
  
          // Load Templates
          'components/**/*.template.html',
  
          // Load Tests
          'test/**/**.mocha.js'
      ],
      exclude: [
          // JSDoc Files
          'core/**/*.jsdoc.js',
          'components/**/*.jsdoc.js'
      ],
      autoWatch: true,
      frameworks: ['mocha', 'sinon-chai'],
      browsers: ['Chrome'],
      client: {
          mocha: {
              reporter: 'html'
          }
      },
      preprocessors: {
          'components/**/*.template.html': ['ng-html2js']
      },
      ngHtml2JsPreprocessor: {
          moduleName: 'templates'
      },
      plugins: [
          'karma-chrome-launcher',
          'karma-firefox-launcher',
          'karma-mocha',
          'karma-sinon-chai',
          'karma-ng-html2js-preprocessor'
      ]
  });
  };
  </code></pre>
  
  <p>Protractor Config:</p>
  
  <pre><code>//jshint strict: false
  exports.config = {
      allScriptsTimeout: 11000,
      specs: [
          //'*.js'
          'components/textfieldTODO.mocha.js'
      ],
  
      capabilities: {
          'browserName': 'chrome'
      },
  
      baseUrl: 'http://localhost:8000/',
      framework: 'mocha',
  
      jasmineNodeOpts: {
          defaultTimeoutInterval: 30000
      },
  };
  </code></pre>
  
  <p>I know there are similar questions but none of their answers work for me. </p>
  
  <p><strong>SO suggestions I have looked into:</strong></p>
  
  <p>(1) Is angular-mocks included in file array after angular.js?</p>
  
  <p>Yessir. You can confirm it in my karma.config</p>
  
  <p>(2) Are your angular-mocks and angular the same version.</p>
  
  <p>Yep. Version 1.6.6</p>
  
  <p>(3) Angular and Jasmine versions might not jive.</p>
  
  <p>I googled and googled and googled but I can't ascertain which versions go with which others. Here's what I'm working with:</p>
  
  <p>AngularJS 1.6.6</p>
  
  <p>Jasmine 2.8.0</p>
  
  <p>Mocha 3.5.0</p>
  
  <p>Protractor 5.1.2</p>
  
  <p>Any suggestion, no matter how farfetched would be appreciated. I've been stuck for quite some time. Thanks</p>