I installed eagle through npm, and when I add it to a nuxt plugin:
/plugins/eagle_slider.js
import Vue from 'vue'
import Eagle from 'eagle.js'
Vue.use(Eagle)
I get the following error:
{ D:\Sites\nuxt\batorangol\node_modules\eagle.js\dist\eagle.js:8
import { throttle } from 'lodash';
SyntaxError: Unexpected token import
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at r (D:\Sites\nuxt\batorangol\node_modules\vue-server-renderer\build.js:8330:16)
at Object.<anonymous> (server-bundle.js:3847:18)
at __webpack_require__ (webpack:/webpack/bootstrap 7f713d772752d58f1904:25:0)
at Object.<anonymous> (plugins/core-components.js:1:0)
at __webpack_require__ (webpack:/webpack/bootstrap 7f713d772752d58f1904:25:0)
at Object.<anonymous> (.nuxt/index.js:1:0)
at __webpack_require__ (webpack:/webpack/bootstrap 7f713d772752d58f1904:25:0) statusCode: 500, name: 'SyntaxError' }
I installed eagle through npm, and when I add it to a nuxt plugin:
/plugins/eagle_slider.js
I get the following error:
package.json contains:
"eagle.js": "^0.1.5"
Any idea why this happens?