Karma error Cannot call method 'module' of undefined

Jess

I am getting this error when running test.sh. (I think I got test.sh from the aungular-seed project)

INFO [Chrome 26.0.1410 (Linux)]: Connected on socket gB-olqxn3xDa6fV2ENBw
Chrome 26.0.1410 (Linux) ERROR
    Uncaught TypeError: Cannot call method 'module' of undefined
    at /home/me/git/blah/blah/public/lib/angular-1.0.7/angular-cookies.js:15

Why?

Jess

You need to include angular.js in your karma.conf.js file: 'public/lib/angular*/angular.js'

This solved the problem for me, but maybe there is a better way also. See also the karma.conf.js file from the angular-seed project.

config/karma.conf.js:

// list of files / patterns to load in the browser
files: [
  'public/lib/angular*/angular.js',
  'public/lib/**/*.js',
  'public/js/**/*.js',
  'routes/**/*.js',
  'server/**/*.js',
  'test/unit/**/*Spec.js'
],

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

AngularJS and Karma, Cannot call method 'module' of undefined

From Dev

AngularJS and Karma, Cannot call method 'module' of undefined

From Dev

"Cannot call method 'transaction' of undefined" error in indexedDB

From Dev

JQueryValidation plugin error: "Uncaught TypeError: Cannot call method 'call' of undefined"

From Dev

Call to undefined method error

From Dev

Cordova : Error When adding platform (cannot call method 'replace' of undefined)

From Dev

Push data into array - Error: Cannot call method 'push' of undefined

From Dev

mongoose and node error : Cannot call method 'model' of undefined

From Dev

NodeJS error with connect-busboy, "TypeError: Cannot call method 'on' of undefined"

From Dev

TypeError: Cannot call method 'then' of undefined

From Dev

Cannot call method 'use' of undefined

From Dev

BackboneJS - Cannot call method 'on' of undefined

From Dev

Javascript: Cannot call method of undefined

From Dev

Cannot call method 'use' of undefined

From Dev

TypeError: Cannot call method of undefined

From Dev

Cannot read module of undefined - error with cloudinary module

From Dev

Error: Call to a possibly undefined method

From Dev

Call to undefined method error in Laravel

From Dev

Webstorm karma/jasmine angularjs testing - reference error module is undefined

From Dev

Method call throws an "undefined method" error

From Dev

'Cannot find module' error using karma-browserify on Windows

From Dev

Cannot find module error when using karma-webpack

From Dev

Cannot find module error when using karma-webpack

From Dev

Karma Webpack - Error: Cannot find module "./test/utilities.js"

From Dev

Error: Cannot find module '@angular-cli/plugins/karma'

From Dev

Uncaught TypeError: Cannot call method 'getLocalName' of undefined

From Dev

Cannot call method 'match' of undefined handlebar issue

From Dev

ionicModal Cannot call method 'fromTemplateUrl' of undefined

From Dev

TypeError: Cannot call method 'click' of undefined

Related Related

  1. 1

    AngularJS and Karma, Cannot call method 'module' of undefined

  2. 2

    AngularJS and Karma, Cannot call method 'module' of undefined

  3. 3

    "Cannot call method 'transaction' of undefined" error in indexedDB

  4. 4

    JQueryValidation plugin error: "Uncaught TypeError: Cannot call method 'call' of undefined"

  5. 5

    Call to undefined method error

  6. 6

    Cordova : Error When adding platform (cannot call method 'replace' of undefined)

  7. 7

    Push data into array - Error: Cannot call method 'push' of undefined

  8. 8

    mongoose and node error : Cannot call method 'model' of undefined

  9. 9

    NodeJS error with connect-busboy, "TypeError: Cannot call method 'on' of undefined"

  10. 10

    TypeError: Cannot call method 'then' of undefined

  11. 11

    Cannot call method 'use' of undefined

  12. 12

    BackboneJS - Cannot call method 'on' of undefined

  13. 13

    Javascript: Cannot call method of undefined

  14. 14

    Cannot call method 'use' of undefined

  15. 15

    TypeError: Cannot call method of undefined

  16. 16

    Cannot read module of undefined - error with cloudinary module

  17. 17

    Error: Call to a possibly undefined method

  18. 18

    Call to undefined method error in Laravel

  19. 19

    Webstorm karma/jasmine angularjs testing - reference error module is undefined

  20. 20

    Method call throws an "undefined method" error

  21. 21

    'Cannot find module' error using karma-browserify on Windows

  22. 22

    Cannot find module error when using karma-webpack

  23. 23

    Cannot find module error when using karma-webpack

  24. 24

    Karma Webpack - Error: Cannot find module "./test/utilities.js"

  25. 25

    Error: Cannot find module '@angular-cli/plugins/karma'

  26. 26

    Uncaught TypeError: Cannot call method 'getLocalName' of undefined

  27. 27

    Cannot call method 'match' of undefined handlebar issue

  28. 28

    ionicModal Cannot call method 'fromTemplateUrl' of undefined

  29. 29

    TypeError: Cannot call method 'click' of undefined

HotTag

Archive