New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ng serve throws 'Critical dependency' and 'Module not found' warnings/errors #12756
Comments
ng serve
throws 'Critical dependency' and 'Module not found' warnings/errors
ng serve
throws 'Critical dependency' and 'Module not found' warnings/errors
If it's really needed I can share the repository. Let me know. |
From the log output it appears |
The structure change may have also caused the tsconfig for the application to include in more than it should. If you changed the layout, you may need to adjust the |
@clydin Yeah, I've accidentally imported |
no problem. Things like that happen. |
@dannydtk had the same issue - for anyone else who may come across this, when adding
Yikes. Wish I had found this post an hour sooner! |
@kmjungersen You just saved me hours! |
@dannydtk I made that mistake too |
Oh my god thank you so much |
Has anyone reported this to the appropriate VS Code and/or Extension that controls that? Seems like it is prioritizing a dev dependency over a normal dependency and one that is in @angular/core should probably be imported over protractor for sure. |
thanks a lot @Tzahi12345 |
Thanksssss |
Thanks a lot |
The same happened in angular 8 😄 |
import { Component, Output ,EventEmitter } from '@angular/core'; I faced the same issue.I imported above package it worked for me |
got the same problem here, someone should tell vscode team |
I think it's just a case of paying close attention to what you are importing and where when the line is added. If there are more than one found it should give you the option to choose the one to import each time. This is a UX they can borrow from things like Resharper and CodeRush. Imports should not be automatically made if there is any ambiguity. |
Thanks. Yes by default EventEmitter is imported from Protractor in VS Code so import it from |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Command (mark with an
x
)Versions
Node: v8.12.0
NPM: 6.4.1
Yarn: 1.10.1
OS: macOS Mojave 10.14
Repro steps
ng new project -g -S --routing -style scss
tsconfig.json
s not modifiedstyles.scss
tosrc/styles/styles.scss
with properangular.json
modificationThe log given by the failure
Desired functionality
The app should start normally.
Mention any other details that might be useful
node_modules
, reinstall,ng serve
)package.json
The text was updated successfully, but these errors were encountered: