I've been working on an existing project built with Ionic framework. I'm trying to integrate push notifications using Ionic's feature, but when running the grunt command, I encountered the following error:
Running "jsbeautifier:files" (jsbeautifier) task
Beautified 53 files, changed 0 files...OK
Running "jshint:files" (jshint) task
./www/js/app.js
18 | var push = new Ionic.Push({
^ 'Ionic' is not defined.
It seems like the Ionic JS file located at
lib/ionic-platform-web-client/dist/ionic.io.bundle.min.js
is not being loaded in grunt. How can I resolve this issue? I don't have much experience with grunt and Ionic, so any help would be appreciated. I couldn't find a solution in similar questions that I came across.
By the way, the application works fine in the browser.
Here is the relevant section of the gruntfile.js for jshint:
jshint: {
options: {
curly: true,
eqeqeq: true,
eqnull: true,
browser: true,
strict: false,
globalstrict: false,
node: true,
undef: true,
globals: {
angular: true,
cordova: true,
app: true,
StatusBar: true,
CameraPopoverOptions: true,
ionic: true,
Camera: true
},
},
files: {
src: ["*.js", "./www/js/*.js", "./www/components/**/*.js", "!*.min.js", "!./www/**/*.min.js", "!./www/**/**/*.min.js"]
}
},