Uncaught TypeError: angular.module is not a function
See original GitHub issueMy webpack.config.js
as below
var path = require('path')
, webpack = require('webpack')
module.exports = {
context : __dirname,
resolve : {
modulesDirectories : [ 'node_modules', 'bower_components' ],
extensions : [ '', '.js', '.jsx' ]
},
entry : {
app: './static/scripts/app.js'
},
output : {
path : path.resolve('./assets'), // bridge point to django
filename : '[name].js'
},
plugins : [
/*
new webpack.ResolverPlugin(
new webpack.ResolverPlugin.DirectoryDescriptionFilePlugin('bower.json', ['main'])
)
*/
],
devtool : 'source-map'
}
My demo project looks like
if I enable webpack.ResolverPlugin
, I will get below error when open index.html in the browser
Running webpack
output(with webpack.ResolverPlugin
or not) looks like below:
Where have I done wrong? Plz kindly help me out, thx.
Issue Analytics
- State:
- Created 8 years ago
- Comments:19
Top Results From Across the Web
Uncaught TypeError: angular.module is not a function at
You are trying to use a variable called angular. Think what causes that variable to exist. That is found in the angular.js script...
Read more >angular.module(...).info is not a function in angular-aria #15786
I encountered the following bug - after upgrading angular-aria to recently released v1.6.3 I'm getting the following error: Uncaught ...
Read more >TypeError: Object(...) is not a function at Module ... - Telerik
Hi ,I'm using Kendo with angular 7.2.0 but getting this error - TypeError: ... is not a function at Module node_modules/@progress/kendo-an.
Read more >TypeError: "x" is not a function - JavaScript - MDN Web Docs
The JavaScript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value...
Read more >Angular Modules - W3Schools
The module is a container for the application controllers. ... A module is created by using the AngularJS function angular.module. <div ng-app="myApp">.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Angular doesn’t seem to support CommonJS. You’ll need to shim it with
exports-loader
.They did put in their changelog that they were supporting CommonJS, but I’ve always had this issue with the library.
@danpantry by the way, I rename
raven-js/plugins/angular.js
file to something else, likeraven-js/plugins/ra-ng.js
, and It works.