javascript - jQuery.Deferred exception: i is not a function TypeError: i is not a function -


i've deployed carcass of phoenix app heroku (link) have similar warning , error in js console:

warning:

jquery.deferred exception: not function typeerror: not function

error:

uncaught typeerror: not function

in development environment, works fine.

tried recompile brunch heroku run brunch build , tried modify brunch config file. looks got lost or put in wrong order after minification. stuck.

can me?

brunch-config.js

  exports.config = {   // see http://brunch.io/#documentation docs.   files: {     javascripts: {       jointo:         "js/app.js",       order: {         before: [           "node_modules/jquery/dist/jquery.js",           "node_modules/what-input/src/what-input.js",           "node_modules/foundation-sites/js/foundation.core.js",           "node_modules/foundation-sites/js/foundation.topbar.js",           "node_modules/foundation-sites/js/foundation.reveal.js",           "node_modules/foundation-sites/js/foundation.offcanvas.js"         ]       }        // use separate vendor.js bundle, specify 2 files path       // http://brunch.io/docs/config#-files-       // jointo: {       //  "js/app.js": /^(web\/static\/js)/,       //  "js/vendor.js": /^(web\/static\/vendor)|(deps)/       // }       //       // change order of concatenation of files, explicitly mention here       // order: {       //   before: [       //     "web/static/vendor/js/jquery-2.1.1.js",       //     "web/static/vendor/js/bootstrap.min.js"       //   ]       // }     },     stylesheets: {       jointo: "css/app.css",       order: {         after: ["web/static/css/app.css"] // concat app.css last       }     },     templates: {       jointo: "js/app.js"     }   },    conventions: {     // option sets should place non-css , non-js assets in.     // default, set "/web/static/assets". files in directory     // copied `paths.public`, "priv/static" default.     assets: /^(web\/static\/assets)/   },    // phoenix paths configuration   paths: {     // dependencies , current project directories watch     watched: [       "web/static",       "test/static"     ],      // compile files     public: "priv/static"   },    // configure plugins   plugins: {     babel: {       // not use es6 compiler in vendor code       ignore: [/web\/static\/vendor/]     },     sass: {       options: {         includepaths: [           'node_modules/foundation-sites/scss',           'node_modules/motion-ui/src'         ]       }     }   },   modules: {     autorequire: {       "js/app.js":            ["web/static/js/app"]     }   },    npm: {     enabled: true,     globals: {       $: 'jquery',       jquery: 'jquery',     },     whitelist: ["phoenix", "phoenix_html", "jquery", "jquery-validation", "foundation-sites"]   } }; 

i've found solution copying foundation.min.js web/static/vendor:

cp ./node_modules/foundation-sites/dist/js/foundation.min.js web/static/vendor/ 

pushed changes heroku , works fine.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -