question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ng serve throwing error - ERROR in Could not resolve module /C/ i 「wdm」: Failed to compile.

See original GitHub issue

Bug Report or Feature Request (mark with an x)

- [X ] bug report -> please search issues before submitting
- [ ] feature request

Command (mark with an x)

- [ ] new
- [ ] build
- [X ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

node version v8.11.3 npm version 6.4.1

Repro steps

https://github.com/DeborahK/Angular-GettingStarted

Run the project in VS code (folder APM-Start)

The log given by the failure

ng serve -o

** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ ** Date: 2018-12-10T00:54:55.452Z Hash: aa987cb762275e989b79 Time: 4786ms chunk {main} main.js, main.js.map (main) 1.87 kB [initial] [rendered] chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 92.4 kB [initial] [rendered]4 kB [initial] [rendered] try] [rendered] chunk {runtime} runtime.js, runtime.js.map (runtime) 6.08 kB [enl] [rendered]try] [rendered] ] [rendered] chunk {styles} styles.js, styles.js.map (styles) 16.5 kB [initial] [rendered] chunk {vendor} vendor.js, vendor.js.map (vendor) 318 kB [initial] [rendered]

ERROR in Could not resolve module /C/ i 「wdm」: Failed to compile.

Desired functionality

Application must run fine (load index.html page)

Mention any other details that might be useful

Running the project in VS Code environment

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

8reactions
filipemelocommented, Jan 17, 2019

I had simmilar bug, and in my case it was because the folder had in the name “#”. I was doing a project on C# and put on the project on "C:/Code/C#"and I changed the name to “C:/Code/CSharp” and solved my problem. I saw that some people put the project on "H:/#httpdocs"and the “#” my be the cause.

1reaction
girishuppalcommented, Jan 16, 2019

I believe we can close this issue now. As it continues to appear in my machine and others are unable to reproduce

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error in ng serve "Could not resolve module" - Stack Overflow
I found the solution. I was creating the app folder in #htdocs folder. I moved it outside it and everything works fine. That's...
Read more >
you may need an appropriate loader to handle this file type. angular ...
I am getting this error ... ERROR in ./app.component.htm 1:0 Module parse failed: Unexpected token (1:0) You may need an appropriate loader to...
Read more >
Angular library: Module not found error | by Tanya Gray
This project is an Angular app and Angular library in one project. The app consumes the library directly, not via npm. The error...
Read more >
Module not found: Error: Can't resolve 'http'. Unable to serve ...
Unable to serve Angular6 application with Jenkins Module ... Then I tried to do an ng serve which resulted in the following error....
Read more >
Javascript – Module not found: Error: Can't resolve 'fs' in – iTecNote
Javascript – Module not found: Error: Can't resolve 'fs' in ... "vit10dev": "ng build --prod -c vit10dev", "vit10test": "ng build --prod -c vit10test", ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found