Angular-cli: ng serve throwing error - ERROR in Could not resolve module /C/ i ï½¢wdmï½£: Failed to compile.

Created on 10 Dec 2018  Â·  12Comments  Â·  Source: angular/angular-cli

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

devkibuild-angular repro steps

Most helpful comment

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.

All 12 comments

@girishuppal thanks for reporting this however I am unable to reproduce the issue with the project you provided.

image

Can it be because of this ?
image

@girishuppal no, that doesn't look like it should affect paths. Perhaps it's related to the folder you clone to.

@girishuppal let us know if you have any further insight. Hopefully we're able to reproduce the problem and fix it. Alternatively, it could be an issue in your environment that we cannot help with.

Can you please let me know what additional things you need?

@girishuppal we need a way to reproduce this problem in our machines. @alan-agius4 tried to reproduce it but couldn't. If we cannot reproduce the problem, we cannot fix it.

It's hard to know why it happens on your machine but not on ours. Perhaps it is the folder you are using, perhaps it is something else.

So the best think you can do is give very precise instructions for us to follow, that you can also follow, and are able to reproduce the problem. Imagine you are someone else on another computer trying to follow the instructions. A good rule is that if you look at your own instructions and it is not clear what commands to run, or where to run them, then you need more detail.

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

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.

@filipemelo , thanks, I had the same and your reply helped me instantly.

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.

Thanks @filipemelo my friend. It worked like a charm !! Great find !

i am alos having same issue. is ther any soluition for this

I haev used below commands to create my cli application

ng new AZD-rangeslider

Answer:

https://stackoverflow.com/questions/48462862/error-in-ng-serve-could-not-resolve-module

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._

Was this page helpful?
0 / 5 - 0 ratings