Skip to content

Deleteing node_modules causes "You seem to not be depending on "@angular/core"." #6504

Closed
@EekoS

Description

@EekoS
- [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

Repro steps.

  1. install npm
  2. yarn global add @angular/cli@1.0.6 or npm install -g @angular/cli@1.0.6 (both produce the same)
  3. ng new myproj
  4. ng serve - works
  5. check-in to your source-control all the project files except for node_modules directory
    5.1. one can simply run move node_modules node_modules2 instead of steps 5+6
  6. go to a different computer and run steps 1+2. then, fetch the project from the source-control.
  7. ng b -> produces: You seem to not be depending on "@angular/core". This is an error.
    ng serve -> produces:
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?)

Desired functionality.

I expected the angular-cli to successfully build the project and download all the dependencies.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions