Error occur after reinstall node modules
My layout component is like this:
` @Component({
selector: 'admin-main-layout',
templateUrl: './main-layout.component.html',
styleUrls:
[
'assets/admin/css/bootstrap.min.css',
'assets/admin/css/font-awesome.min.css',
...
],
encapsulation: ViewEncapsulation.None
})
`
That work fine untill ..
Recently when I delete the node_modules folder and reinstall using npm install
The error occur when I run ng server :
`
ERROR in ./src/app/admin/main-layout.component.ts Module not found: Error: Can't resolve './assets/admin/css/bootstrap.min.css' in ... ... @ ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js @ ./~/@angular/core/src/linker.js @ ./~/@angular/core/src/core.js @ ./~/@angular/core/index.js @ ./src/main.ts @ multi main `
Is there any new update in core that couse the problem? Thank you.
Style urls should be relative, and it looks like you're using an absolute path. Try making the url relative to the component.
Thanks :) Relative path solve the problem.
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.