Comments (14)
You must stay on the 1.x.x version if you're using angular 2.x.x. Only switch to the 2.x.x versions of you are using angular beta.4. (check the github release tags for the current versions of this project). That issue though is unrelated to the reported one.
from angular2-hotkeys.
I'm pretty sure it has to do with the version of @angular/cli. I'm currently upgrading a project that uses this library to that version of the cli. I'll get back to you when I'm finished!
from angular2-hotkeys.
The CLI now enforces AOT compilation compatibility during it's first run and when you save a file it gets around the check so the error doesn't throw.
It's getting mad at a few things and I'm struggling to figure out exactly what to do to modify it.
You can see more at angular/angular#11262
and angular/angular-cli#3707
from angular2-hotkeys.
It's from fb5c5f5
The switch to InjectionToken
doesn't exist. It's saying that it doesn't exist, I'm on 2.4.6 as it's stable but folks on 4.0 see a depreciation notice: https://github.com/angular/angular/blob/master/modules/%40angular/core/src/di/injection_token.ts#L29
So I'm guessing you changed it to support 4.0 but it broke for those of us on 2.0..
from angular2-hotkeys.
v1.0.3 worked for me. ie:
yarn add [email protected]
from angular2-hotkeys.
Can you paste the output of running ng --version
for me?
from angular2-hotkeys.
sure, thanks for the quick response.
@angular/cli: 1.0.0-beta.31
node: 6.9.2
os: darwin x64
@angular/common: 2.4.7
@angular/compiler: 2.4.7
@angular/core: 2.4.7
@angular/forms: 2.4.7
@angular/http: 2.4.7
@angular/platform-browser: 2.4.7
@angular/platform-browser-dynamic: 2.4.7
@angular/router: 3.4.7
@angular/cli: 1.0.0-beta.31
@angular/compiler-cli: 2.4.7
from angular2-hotkeys.
cool thanks! It's weird, it fails to compile the first time, but if I save/update code it'll compile successfully.
from angular2-hotkeys.
It's something to do with the OpaqueToken used for passing in the config. I'm not sure yet how to fix it
from angular2-hotkeys.
It's not related? I replaced my option files in both /src and /dist with the 1.x version that still uses OpaqueToken
and it cleared the error message.
from angular2-hotkeys.
I meant the error saying "InjectionToken doesn't exist" isn't the issue that the OP was having.
from angular2-hotkeys.
Oh for sure, here's my error log:
ERROR in Error encountered resolving symbol values statically. Calling function 'InjectionToken', function calls are not supported.
Consider replacing the function or lambda with a reference to an exported function, resolving symbol HotkeyOptions in /***/node_modules/angular2-hotkeys/src/hotkey.options.d.ts, resolving symbol HotkeyModule.forRoot in /***/node_modules/angular2-hotkeys/index.d.ts, resolving symbol AppModule
Then when I go into hotkeys.options.d.ts my typescript linter is marking InjectionToken
as not an exported module
so I reverted all the option files to the 1.x version and the issue cleared
from angular2-hotkeys.
I'm experiencing the same issue. What do you mean by "so I reverted all the option files to the 1.x version and the issue cleared" @DennisSmolek
from angular2-hotkeys.
Thank you, this solved my issue to.
from angular2-hotkeys.
Related Issues (20)
- Cannot find name 'MousetrapInstance' HOT 1
- `cannot find mousetrap` issue fix .Kindly update HOT 1
- Unable to remove(unbind) the hotkey with the specific event
- Angular 12 compatibility HOT 8
- Is it possible to prevent hotkeys being active in a material select? HOT 1
- how to remove all listener on destroy HOT 2
- Angular 13 compatibility HOT 6
- Angular 13.1.1 compilation error with mousestrap HOT 3
- Publish an Ivy distribution HOT 2
- Can cheatsheethotkey define string[]? HOT 2
- Angular 14 compatibility HOT 3
- Cypress clicks on hidden hotkeys-cheatsheet component HOT 1
- Hotkey params not being passed to mousetrap?
- 13.2.0 not working properly HOT 4
- After updating to v15.0.0, a type definition error regarding mousetrap occurs. HOT 3
- Is it compatible with Angular v16+ HOT 6
- Angular build warning: Mousetrap commonjs dependency HOT 1
- Angular 17 support HOT 3
- Property '"title"' is incompatible with index signature.
- Unit tests failing with the error - No provider for InjectionToken HotkeyOptions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular2-hotkeys.