Git Product home page Git Product logo

Comments (14)

brtnshrdr avatar brtnshrdr commented on August 20, 2024 3

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.

brtnshrdr avatar brtnshrdr commented on August 20, 2024 1

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.

DennisSmolek avatar DennisSmolek commented on August 20, 2024 1

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.

DennisSmolek avatar DennisSmolek commented on August 20, 2024 1

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.

brentchow avatar brentchow commented on August 20, 2024 1

v1.0.3 worked for me. ie:

from angular2-hotkeys.

brtnshrdr avatar brtnshrdr commented on August 20, 2024

Can you paste the output of running ng --version for me?

from angular2-hotkeys.

brentchow avatar brentchow commented on August 20, 2024

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.

brentchow avatar brentchow commented on August 20, 2024

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.

brtnshrdr avatar brtnshrdr commented on August 20, 2024

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.

DennisSmolek avatar DennisSmolek commented on August 20, 2024

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.

brtnshrdr avatar brtnshrdr commented on August 20, 2024

I meant the error saying "InjectionToken doesn't exist" isn't the issue that the OP was having.

from angular2-hotkeys.

DennisSmolek avatar DennisSmolek commented on August 20, 2024

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.

Rudde avatar Rudde commented on August 20, 2024

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.

Rudde avatar Rudde commented on August 20, 2024

Thank you, this solved my issue to.

from angular2-hotkeys.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.