Please provide us with the following information:
Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Windows 8
Please run
ng --version. If there's nothing outputted, please run in a Terminal:node --versionand paste the result here:
@angular/cli: 1.0.0-beta.32.3
node: 6.9.2
os: win32 x64
Was this an app that wasn't created using the CLI? What change did you do on your code? etc.
npm uninstall -g angular-cli @angular/cli
npm cache clean
npm install -g @angular/cli@latest
ng new sample
copied app folder from old-sample to new sample
ng serve
Normally this include a stack trace and some more information.
ERROR in ./src/app/user/reset-password/reset.password.component.css
Module not found: Error: Can't resolve './' in 'C:\webweb\src\app\user
t\reset-password'
@ ./src/app/user/reset-password/reset.password.component.css 6:353-3
66
@ ./src/app/user/reset-password/reset-password.component.ts
@ ./src/app/user/index.ts
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts
ERROR in ./src/app/user/login/login.test.component.css
Module not found: Error: Can't resolve './' in 'C:\webweb\src\app\user\login'
@ ./src/app/user/login/login.test.component.css 6:363-376
@ ./src/app/usert/login/login.test.component.ts
@ ./src/app/user/index.ts
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts
ERROR in ./src/app/user/forgot-password/forgot-password.component.css
Module not found: Error: Can't resolve './' in 'C:\webweb\src\app\userforgot-password'
@ ./src/app/user/forgot-password/forgot-password.component.css 6:353
-366
@ ./src/app/user/forgot-password/forgot-password.component.ts
@ ./src/app/user/index.ts
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts
this error started when i did upgrade angular/cli
i thought the errors could be as a result of referencing css
changed and swap between the following but still didnt work
styleUrls:['./forgot-password.component.css']
styleUrls:['forgot-password.component.css']
Thanks! We'll be in touch soon.
Are there any imports or url()'s in the stylesheet in question?
yes, remove background-image: url(""); from css did solve my issue.
thanks @mattdistefano and @clydin
Any fix does not involve removing background-image: url("")?
Setting images to url("/assets/images/...") stops it from breaking and works with ng-serve but does not make the correct route change when building to production.
Closing as answered.
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._
Most helpful comment
4778 maybe?