Please provide us with the following information:
when running
ng g c masaanliit throws this error
viewEncapsulation is not defined (Error in blueprint template: /repos/masaanli/masaanli-web/node_modules/angular-cli
/blueprints/component/files/__path__/__name__.component.ts)
Problem is I cannot generate modules and components this way anymore or I need to switch back to version 24 馃憥
It was fixed in v 24 when I add this lines myself in the Angular CLI, but now in v 25.5 it broke...
"viewEncapsulation": "Emulated",
"changeDetection": "Default"
The error it throws now:
viewEncapsulation is not defined (Error in blueprint template: /repos/masaanli/masaanli-web/node_modules/angular-cli
/blueprints/component/files/__path__/__name__.component.ts)
ReferenceError: viewEncapsulation is not defined (Error in blueprint template: /repos/masaanli/masaanli-web/node_mod
ules/angular-cli/blueprints/component/files/__path__/__name__.component.ts)
at eval (eval at <anonymous> (/repos/masaanli/masaanli-web/node_modules/lodash/template.js:224:12), <anonymous>:
9:5)
at processTemplate (/repos/masaanli/masaanli-web/node_modules/angular-cli/ember-cli/lib/models/file-info.js:20:3
6)
at /repos/masaanli/masaanli-web/node_modules/angular-cli/ember-cli/lib/models/file-info.js:97:20
at tryCatch (/repos/masaanli/masaanli-web/node_modules/rsvp/dist/rsvp.js:538:12)
at invokeCallback (/repos/masaanli/masaanli-web/node_modules/rsvp/dist/rsvp.js:553:13)
at publish (/repos/masaanli/masaanli-web/node_modules/rsvp/dist/rsvp.js:521:7)
at flush (/repos/masaanli/masaanli-web/node_modules/rsvp/dist/rsvp.js:2373:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
bash-3.2$
Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Please run
ng --version. If there's nothing outputted, please run in a Terminal:node --versionand paste the result here:
6.9.1
25.5
Was this an app that wasn't created using the CLI? What change did you do on your code? etc.
Normally this include a stack trace and some more information.
Thanks! We'll be in touch soon.
I putted the viewEncapsulation settings at the wrong place after merging from 24 to 25 of the Angular CLI.
When I putted the two settings of ViewEncapsulation to Defaults it worked again.
"defaults": {
"styleExt": "scss",
"prefixInterfaces": false,
"inline": {
"style": false,
"template": false
},
"spec": {
"class": false,
"component": true,
"directive": true,
"module": false,
"pipe": true,
"service": true
},
"viewEncapsulation": "Emulated",
"changeDetection": "Default"
}
}
Can this issue be merged with the other corresponding issue?
Closing as it appears to be fixed on your side. I'm not sure what issue you want me to reference though, but feel free to add a comment with it.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._