Versions of @angular/compiler-cli and typescript could not be determined

前端 未结 11 2539
耶瑟儿~
耶瑟儿~ 2020-12-28 14:35

I have installed Angular/cli and then try to run command ng serve then below error is throwing. I have tried lot of thing like uninstall angular/cli, npm cache clean, etc

11条回答
  •  借酒劲吻你
    2020-12-28 14:59

    By default, npm install will install all modules listed as dependencies. With the --production flag, npm will not install modules listed in devDependencies. either we can go

    First Way

    for editing the dependency part in package.json by adding it with relevant version

        "dependencies": {
        /*existing part */
    
         "@angular/cli": "1.5.2",
        "@angular/compiler-cli": "^5.0.0",
        "typescript": "^2.4.2"
        }
    

    Second Way

    To install dev dependencies, npm --production=false install will work even with NODE_ENV=production.

    Or you can run NODE_ENV=development npm install

    for more details click to know more

提交回复
热议问题