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 'NgCytoscapeModule' imported by the module 'AppModule' #9

Open
troelssiggaard opened this issue Sep 4, 2017 · 4 comments

Comments

@troelssiggaard
Copy link

I'm having trouble importing Ng2-Cytoscape. When I compile it gives this error:

ERROR in NgCytoscapeModule is not an NgModule
webpack: Failed to compile.

I'm using the latest Angular 4.4.0-RC.0.

My package.json file:

{
  "name": "dis",
  "version": "1.0.0",
  "license": "MIT",
  "angular-cli": {},
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "lint": "tslint \"src/**/*.ts\"",
    "test": "ng test",
    "pree2e": "webdriver-manager update --standalone false --gecko false",
    "e2e": "protractor",
    "build:vendor": "cd ./node_modules/ng2-tag-input && npm install && npm run prepublish && rm -rf ./node_modules/@angular"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^4.4.0-RC.0",
    "@angular/cdk": "^2.0.0-beta.10",
    "@angular/common": "^4.4.0-RC.0",
    "@angular/compiler": "^4.4.0-RC.0",
    "@angular/core": "^4.4.0-RC.0",
    "@angular/flex-layout": "^2.0.0-rc.1",
    "@angular/forms": "^4.4.0-RC.0",
    "@angular/http": "^4.4.0-RC.0",
    "@angular/material": "^2.0.0-beta.10",
    "@angular/platform-browser": "^4.4.0-RC.0",
    "@angular/platform-browser-dynamic": "^4.4.0-RC.0",
    "@angular/platform-server": "^4.4.0-RC.0",
    "@angular/router": "^4.4.0-RC.0",
    "angular2-jwt": "^0.2.3",
    "core-js": "^2.5.1",
    "cytoscape": "^3.2.2",
    "cytoscape-dagre": "^2.0.0",
    "cytoscape-undo-redo": "^1.2.14",
    "dagre": "^0.7.4",
    "hammerjs": "^2.0.8",
    "jquery": "^3.2.1",
    "ng2-cytoscape": "^0.4.0",
    "ngx-chips": "^1.5.3",
    "retinajs": "^2.1.2",
    "rxjs": "^5.4.3",
    "ts-helpers": "^1.1.2",
    "zone.js": "^0.8.17"
  },
  "devDependencies": {
    "@angular/cli": "^1.3.2",
    "@angular/compiler-cli": "^4.4.0-RC.0",
    "@types/hammerjs": "^2.0.35",
    "@types/jasmine": "2.5.54",
    "@types/jquery": "^3.2.12",
    "@types/node": "^8.0.26",
    "codelyzer": "~3.1.2",
    "jasmine-core": "2.8.0",
    "jasmine-spec-reporter": "4.2.1",
    "karma": "1.7.1",
    "karma-chrome-launcher": "^2.2.0",
    "karma-cli": "^1.0.1",
    "karma-jasmine": "^1.0.2",
    "karma-remap-istanbul": "^0.6.0",
    "protractor": "~5.1.2",
    "ts-node": "3.3.0",
    "tslint": "^5.7.0",
    "typescript": "^2.5.2"
  }
}

@ssuperczynski
Copy link
Contributor

ssuperczynski commented Sep 4, 2017

Check #6, as far as I know it might not work because ng2-cytoscape uses angular ^4.3.5, since you use ^4.4.0-RC.0.

@troelssiggaard
Copy link
Author

Well, I just downgraded to ^4.3.5 without any changes, the error persists. :(

@ssuperczynski
Copy link
Contributor

Have you tried rm -rf node_modules?
Could you add whole stack trace here.
Could you try import {NgCytoscapeModule} from "ng2-cytoscape"; instead of import {NgCytoscapeModule} from "ng2-cytoscape/dist";

@dooffas
Copy link

dooffas commented Sep 26, 2017

I was seeing this problem when using 4.4.0-RC.0. I have tested this with the newer version of Angular (4.4.3), this is no longer an issue.

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

3 participants