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

Unable to use videogular2 with angular 2.0.2 #249

Closed
cindyliu-yb opened this issue Oct 11, 2016 · 17 comments
Closed

Unable to use videogular2 with angular 2.0.2 #249

cindyliu-yb opened this issue Oct 11, 2016 · 17 comments

Comments

@cindyliu-yb
Copy link

Description

I can use videogular2 with angular 2.0.0, but once I update angular to 2.0.2. It gave me this error that "Unexpected value 'VgCore' imported by the module 'MainModule'".

Expected Behavior

VgCore successfully imported into the MainModule

Actual Behavior

VgCore can't be imported

Steps to Reproduce

  1. Create a simple angular2 webpack starter project which bootstraps MainModule with only a main component.
  2. npm install videoangular and import it into MainModule

Attachments

screen shot 2016-10-11 at 11 44 48

Thanks in advance!!!

@digitalkaoz
Copy link

same here

@opiepj
Copy link

opiepj commented Oct 13, 2016

Having the same issue with Angular 2.1.0

@digitalkaoz
Copy link

It was solved for me when i deleted the hardcoded pinned angular 2.0.0
packages below this package in node_modules

Patrick Opie [email protected] schrieb am Do., 13. Okt. 2016,
23:32:

Having the same issue with Angular 2.1.0


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#249 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAR612cOqHj5XnOn-OoqZZPABJCTjPQOks5qzqNNgaJpZM4KTfiF
.

@cindyliu-yb
Copy link
Author

@digitalkaoz hey, what do you mean by hardcoded pinned angular2.0.0 packages? Below are the files in the videogular2 folder.
screen shot 2016-10-14 at 08 21 39

@Elecash
Copy link
Member

Elecash commented Oct 14, 2016

@cindyliu-yb
Copy link
Author

I tried this. It still does not work for me :(

@digitalkaoz
Copy link

the node_modules folder below videogular2 in your node_modules

@comoris
Copy link

comoris commented Oct 16, 2016

having the same issue/error message.
installed angular cli 1.0.0-beta.17,
updated angular to "2.1.0" in my node_modules
npm i videogular2
cd to videogular2 module
updated package.json file in videogular2 to angular "2.1.0" & removed node modules
npm i in videogular2
import {VgCore} from 'videogular2/core'
... as described

btw no issues with 2.0.0

@Elecash
Copy link
Member

Elecash commented Oct 16, 2016

According to this thread it seems a problem with Angular CLI: angular/angular-cli#2291

You can update the Angular CLI or if you want to fix it locally add this to your webpack config:

module.exports = {
  resolve: { 
    modules: [ path.join(__dirname, "node_modules") ]
  }
};

I'll update the https://github.com/videogular/videogular2-starter repo too.

@comoris
Copy link

comoris commented Oct 17, 2016

thanks @Elecash,
I'm using the latest cli version (1.0.0-beta.17), not sure where to add the resolve in angular cli.
(considering switching to the starter for the moment).

@Elecash
Copy link
Member

Elecash commented Oct 17, 2016

@comoris seems that this fix was made 6 days ago and Angular CLI 1.0.0-beta.17 was released 10 days ago, so maybe we need to wait to beta.18.

@digitalkaoz
Copy link

digitalkaoz commented Oct 20, 2016

so beta-18 is out, and it works here

@comoris
Copy link

comoris commented Oct 21, 2016

yes, works like a charm, thks

@Elecash
Copy link
Member

Elecash commented Oct 21, 2016

Thanks for confirming @comoris

@Elecash Elecash closed this as completed Oct 21, 2016
@cindyliu-yb
Copy link
Author

yes it works now! thanks!

@scottopolis
Copy link

Hello, I'm using angular-cli: 1.0.0-beta.19-3 and still seeing this error. I am on the latest version of Ionic 2 and ionic-app-scripts, here is the error:

Uncaught Error: Unexpected value 'VgCore' imported by the module 'AppModule'(…) webpack:///./~/@angular/compiler/src/metadata_resolver.js?:241

Any help is appreciated, thanks!

@Elecash
Copy link
Member

Elecash commented Nov 12, 2016

@scottopolis we moved the https://github.com/videogular/videogular2-starter to angular-cli.

AOT compilation is working for me in that repo.

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

Successfully merging a pull request may close this issue.

6 participants