TypeError: element.summernote is not a function
See original GitHub issueI’m using Yeoman Angular-Fullstack generator, this is my first time using webpack.
This error has given me headaches for a lot of hours:
angular.js:13920TypeError: element.summernote is not a function
It is supposed to appear when the dependencies aren’t loaded in the right order. I can’t get it to work even with my app.ts looking like this:
var $ = require('jquery');
import 'bootstrap/dist/css/bootstrap.css';
const bootstrap = require('bootstrap');
const codemirror = require("codemirror");
import 'summernote/dist/summernote.css';
const summernote = require('summernote');
const angular = require('angular');
// import ngAnimate from 'angular-animate';
const ngCookies = require('angular-cookies');
const ngResource = require('angular-resource');
const ngSanitize = require('angular-sanitize');
const uiRouter = require('angular-ui-router');
const uiBootstrap = require('angular-ui-bootstrap');
const ngSummernote = require('angular-summernote');
const lodash = require('lodash');`
The answer could be something pretty simple but I’m running out of ideas. Any help would be appreciated
Issue Analytics
- State:
- Created 7 years ago
- Comments:6
Top Results From Across the Web
ERROR TypeError: _this._$element.summernote is not a ...
I have error ERROR TypeError: _this._$element.summernote is not a function in Installation Install ngx-summernote and dependencies: npm ...
Read more >TypeError: element.summernote is not a function
summernote is not a function ". It works normally if adding libraries as script tags, without any build tool, but with Webpack it...
Read more >Uncaught TypeError: $(...).summernote is not a function
summernote is not a function error. This error occurs when you try to call the summernote method on an element without including script...
Read more >Summernote not working - Laracasts
after following the documentation of summernote how to implement it i am only seeing this ... summernote is not a function(…) ... Uncaught...
Read more >Examples - Summernote
Super Simple WYSIWYG Editor on Bootstrap Summernote is a JavaScript ... This function get item as first argument and should return Element or...
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 FreeTop 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
Top GitHub Comments
I solved it by adding
$()
to the element beforeactivate
is called (also,$
is an alias forjQuery
in webpack config).This is my first attemp on using webpack so maybe there’s a way of solving it without changing wrapper code.
The problem for us was a missing bower.json file. Adding this file corrected the problem.