- [x] feature request
ng -v
@angular/cli: 1.0.6
node: 6.10.3
os: win32 x64
@angular/common: error
@angular/compiler: error
@angular/core: error
@angular/forms: error
@angular/http: error
@angular/platform-browser: error
@angular/platform-browser-dynamic: error
@angular/router: error
@angular/cli: error
@angular/compiler-cli: error
md5-4d8ddea8162267d5343f50084c4181df
The "@angular/compiler-cli" package was not properly installed.
Error: The "@angular/compiler-cli" package was not properly installed.
Only yarn add or npm install will resolve this, which is somewhat unexpected (I am in the Angular CLI realm now, trying to build, why won't it solve my dependencies itself?)
I expected the angular-cli to successfully build the project and download all the dependencies.
@EekoS It's the desired behavior you must install the node modules before you run the project. It's not specific to @angular dependencies as there might be other dependencies needs to be resolved before running the project.
facing same issue. Any solution for these.
Even npm install not installing anything.
ng --version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ â–³ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
@angular/cli: 1.0.3
node: 7.6.0
os: linux x64
@angular/common: error
@angular/compiler: error
@angular/core: error
@angular/forms: error
@angular/http: error
@angular/platform-browser: error
@angular/platform-browser-dynamic: error
@angular/router: error
@angular/cli: error
@angular/compiler-cli: error
@EekoS For current workaround I change version to 0.0.0 and it working fine. This may be a bug.
@shabbir-dhangot @EekoS Is there a repo I can check?
Thank you for the reply, @sumitarora, I humbly don't see a reason why won't angular-cli simply call the package-builder (npm / yarn) to resolve dependencies when running ng build; but at least is it possible to write a more informative error?
There's no problem with angular's global installation (as it says in my step 7 to reproduce) - so the error should not say that there is IMHO.
@EekoS we have error already in the commands itself. Running ng b without node_modules shows this error node_modules appears empty, you may need to run npm install
nope, that's not what I get. see the original post...
I ran into this same issue deploying an app using ng-cli to Heroku. On the Heroku deploy, I was getting the You seem to not be depending on "@angular/core". message on ng build, which was very confusing, because it was right there in my package.json file. I'm glad I found this issue and was able to apply the workaround of making sure npm install was run before ng build. But, a more informative error message would be very helpful...
@sumitarora: like you, when I rename my node_modules directory and run ng build, I get the correct error message: node_modules appears empty, you may need to run npm install. But when I deploy to heroku, and the node_modules directory is empty, for some reason I'm getting the misleading message You seem to not be depending on "@angular/core". instead. I've tried to figure out what the difference is, but I'm unable to. Sorry, I realize that's not extremely helpful...
lo solucione con:
-> npm link
-> ng serve
y listo
npm link fixed mine. windows 10 here. latest angular cli as of now.
npm link
Helps to solve my problem.
solution:
->npm install
->ng serve
It seems to be related to renaming the folder. The error message is misleading.
I posted the issue and the fix here
However, it is still an issue in angular since it does not show a meaningful related message.
Thanks for reporting this issue. In the latest CLI the error message should be more clear
Could not find module "<foo>" from "<path>".
Please update to the most recent Angular CLI version. If the problem persists, please file a new issue and ensure you provide all of the required information when filling out the issue template.
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
lo solucione con:
-> npm link
-> ng serve
y listo