Search code examples
node.jsangularyarnpkg

Node version problem with Yarn and typescript <error>


I had this error when I run Yarn on my angular project

@coreui/coreui-pro-angular-admin-template@2.4.3: The engine "node" is incompatible with this module. Expected version ">= ^8.9.4". Got "10.15.2"

node --version

is

v10.15.2

ng --version

is

    Angular CLI: 8.3.17
Node: 10.15.2
OS: win32 x64
Angular: <error>
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, http, language-service, platform-browser
... platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.803.17 (cli-only)
@angular-devkit/build-angular   <error>
@angular-devkit/core            8.3.17 (cli-only)
@angular-devkit/schematics      8.3.17 (cli-only)
@schematics/angular             8.3.17 (cli-only)
@schematics/update              0.803.17 (cli-only)
rxjs                            6.4.0 (cli-only)
typescript                      <error>

what does it mean and how could I fix this problem


Solution

  • Thanks All I have found the problem It was in package.json I changed below

      "engines": {
    "node": ">= ^8.9.4",
    "npm": ">= 5.6.0"
      },
    

    to be

      "engines": {
    "node": ">= ^10.15.2",
    "npm": ">= 5.6.0"
      },
    

    Thanks for everybody