I'm running the following code from a test.js file using babel-node from the command line: babel-node test.js
installing jquery
npm i --save jquery
test.js:
import $ from 'jquery';
$.get("www.google.com");
I get TypeError: _jquery2.default.get is not a function
Any suggestion?
Please note that this question is not a duplicate of How to import jquery using ES6 syntax?, because this seems a problem specific to babel-node (the same code works if I create a bundle using webpack with babel and run it from a browser)