SyntaxError: Unexpected token import - Private npm module
[issue link]Hi guys!
First, this is my first report here, so I want to thank you guys. Awesome framework 👏 🎉
I’ve written a module and published in a private npm repository, and have imported it to my nuxt project, but now I’m receiving this error:
Vue.js error
/Users/michaelamaral/dev/cdb/node_modules/@cdb/nexus/index.js:1
(function (exports, require, module, __filename, __dirname) { import doLogin from './modules/doLogin'
^^^^^^
SyntaxError: Unexpected token import
at Object.exports.runInThisContext (vm.js:78:16)
at Module._compile (module.js:543:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (__vue_ssr_bundle__:3879:18)
at __webpack_require__ (__vue_ssr_bundle__:21:30)
Funny thing: the module structure is ‘@cdb/nexus’. If i copy the nexus folder and paste in the node_modules, it works perfectly.
Any ideas? ☹️
Thanks