KonnorRogers / konnors-ninja-keys

Ninja Keys fork!
https://konnorrogers.github.io/konnors-ninja-keys/
MIT License
9 stars 2 forks source link

Failed to import Unexpected token #12

Open jwoertink opened 6 months ago

jwoertink commented 6 months ago

I'm just now giving your fork a try, but after importing, I get this error

assets       | ERROR in ./node_modules/konnors-ninja-keys/src/ninja-keys.js 29:18
assets       | Module parse failed: Unexpected token (29:18)
assets       | You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
assets       | |    * @override
assets       | |    */
assets       | >   static baseName = 'ninja-keys';
assets       | | 
assets       | |   /**
assets       |  @ ./src/js/layouts/MainLayout.vue?vue&type=script&lang=js& (./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./src/js/layouts/MainLayout.vue?vue&type=script&lang=js&) 7:0-28
assets       |  @ ./src/js/layouts/MainLayout.vue?vue&type=script&lang=js&
assets       |  @ ./src/js/layouts/MainLayout.vue
assets       |  @ ./src/js/layouts lazy ^\.\/.*\.vue$ namespace object
assets       |  @ ./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./src/js/layouts/AppLayout.vue?vue&type=script&lang=js&
assets       |  @ ./src/js/layouts/AppLayout.vue?vue&type=script&lang=js&
assets       |  @ ./src/js/layouts/AppLayout.vue
assets       |  @ ./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./src/js/App.vue?vue&type=script&lang=js&
assets       |  @ ./src/js/App.vue?vue&type=script&lang=js&
assets       |  @ ./src/js/App.vue
assets       |  @ ./src/js/main.js
assets       |  @ multi ./src/js/main.js

I'm using Vue2

import "konnors-ninja-keys";

I removed my fork of the original ninja-keys, and added yours "konnors-ninja-keys": "^1.10.0",. Is there anything else I'm missing?

KonnorRogers commented 6 months ago

That looks like a parser error. You're probably on an older version of Babel / Webpack if I had to guess.

I don't pre-bundle the library yet, so there's no fully bundled version for you to grab either as a workaround.

jwoertink commented 6 months ago

Yeah, sadly I'm stuck on older versions without any clear upgrade path until we do a full rewrite. I'll see what I can do to work around it. Thanks!