Since ember-cli 0.0.34 jquery is removed from the .jshint file as predefined. So jquery needs to be imported, but I get the following error when doing it:
import $ from 'jquery';
The error I get is:
ENOENT, no such file or directory 'S:\...\tmp\tree_merger-tmp_dest_dir-Nb27WzDk.tmp\jquery.js' Error: ENOENT, no such file or directory 'S:\...\tmp\tree_merger-tmp_dest_dir-Nb27WzDk.tmp\jquery.js' at Object.fs.statSync (fs.js:684:18) at addModule (S:\...\node_modules\ember-cli\node_modules\broccoli-es6-concatenator\index.js:81:46) .....
This addon makes jQuery available in an Ember project. It also provides the mechanism that implements jQuery integration when that feature is enabled.
Basic Usage In fact, ember-ajax is a wrapper around jQuery's method, and can be configured in much the same way. In general, you will use the request(url, options) method, where url is the destination of the request and options is a configuration hash for jQuery. ajax . import Ember from 'ember'; export default Ember.
I solved the problem by not importing jquery at all. jQuery is available via Ember.$ (link)
So I changed my code to use Ember.$(...)
instead of $(...)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With