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

ng-add schematic throws an error with default import #32

Closed
edbzn opened this issue Aug 22, 2019 · 6 comments
Closed

ng-add schematic throws an error with default import #32

edbzn opened this issue Aug 22, 2019 · 6 comments

Comments

@edbzn
Copy link
Contributor

edbzn commented Aug 22, 2019

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

Hi, when I run the installation schematic ng-add on my existing project I get an un-relevant error :

Cannot read property 'forEach' of undefined

By doing some research I've found that default imports in my app.module.ts are causing this issue. When I remove these default imports the schematics works well.

Expected behavior

Supports of default imports for ng-add schematic.

Minimal reproduction of the problem with instructions

Just add a default import in the app.module.ts like :

import something from './my-module';
import { NgModule } from '@angular/core';
@itayod
Copy link
Contributor

itayod commented Aug 22, 2019

@Edouardbozon Hi, I bumped a version with a fix, could you please try again now?

@edbzn
Copy link
Contributor Author

edbzn commented Aug 22, 2019

@itayod It's still not working with 1.1.2 😕

@edbzn
Copy link
Contributor Author

edbzn commented Aug 22, 2019

Also if I remove default imports I'm getting an error related to the newly added ssr property :

ssr is not defined

Even if I use default values.

@itayod
Copy link
Contributor

itayod commented Aug 22, 2019

@Edouardbozon My bad, I didn't build the schematics I will publish a new version asap

@itayod
Copy link
Contributor

itayod commented Aug 22, 2019

@Edouardbozon I released a new version, I tested it on a tester project and should be working now :)

@edbzn
Copy link
Contributor Author

edbzn commented Aug 22, 2019

Fixed, thanks for the reactivity ! ⚡

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