Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected value 'AngularOpenlayersModule' imported by the module 'AppModule' #31

Closed
alienlike opened this issue Dec 27, 2016 · 6 comments

Comments

@alienlike
Copy link
Contributor

If I tweak tsconfig.json to bypass #26, I'm now seeing this exception at runtime:

Unexpected value 'AngularOpenlayersModule' imported by the module 'AppModule'

There are quite a few posts about this on the web, but I haven't found any fix. It seems that Angular metadata is somehow getting stripped out during compilation.

@quentin-ol
Copy link
Owner

👍 for finding references to this issue!

I'm currently working on a clean-up of the code (code itself+documentation).
This should hit the repo soon. Hoping to solve most of the open issues !

@quentin-ol
Copy link
Owner

I've had similar issues with Angular2 and Typescripts version 2.1.x.
As for now, angular2 is not compatible with typescript 2.1.x. Could you check which version of typescript you're using ?

@alienlike
Copy link
Contributor Author

I was using TS 2.1, but after downgrading to 2.0 the problem persists.

@quentin-ol
Copy link
Owner

quentin-ol commented Jan 1, 2017 via email

@alienlike
Copy link
Contributor Author

Here you have it.

  "dependencies": {
    "@angular/common": "~2.1.0",
    "@angular/compiler": "~2.1.0",
    "@angular/core": "~2.1.0",
    "@angular/forms": "~2.1.0",
    "@angular/http": "~2.1.0",
    "@angular/platform-browser": "~2.1.0",
    "@angular/platform-browser-dynamic": "~2.1.0",
    "@angular/router": "~3.1.0",
    "angular2-openlayers": "file:../../../angular2-openlayers",
    "bootstrap": "^4.0.0-alpha.5",
    "core-js": "^2.4.1",
    "font-awesome": "^4.7.0",
    "lodash": "^4.16.6",
    "moment": "^2.15.1",
    "openlayers": "^3.19.1",
    "reflect-metadata": "^0.1.8",
    "rxjs": "5.0.0-beta.12",
    "zone.js": "^0.6.25"
  }

I have angular2-openlayers locally, at commit 06b69dbc51458b with the following change to work around #26:

diff --git a/tsconfig.json b/tsconfig.json
index 67973c0..d79ae01 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,7 +1,7 @@
 {
     "compilerOptions": {
         "noImplicitAny": true,
-        "module": "es2015",
+        "module": "commonjs",
         "moduleResolution": "node",
         "target": "es5",
         "emitDecoratorMetadata": true,

@quentin-ol
Copy link
Owner

this should be fixed with v0.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants