“You seem to not be depending on ”@angular/core“.”

后端 未结 10 1558
执念已碎
执念已碎 2020-12-24 11:05

When I try to build my project running the following command:

ng build --environment=prod --aot=false  --output-pa         


        
10条回答
  •  庸人自扰
    2020-12-24 11:23

    How to use

    Run npm install inside this project folder to install all dependencies.

    Make sure you use the latest version of the CLI (upgrade guide below)

    Run ng serve to see the app in action (try npm start in case ng serve fails).

    How to upgrade the CLI

    Run the below commands - only use "sudo" on Mac/ Linux.

    sudo npm uninstall -g angular-cli @angular/cli
    
    npm cache clean --force
    
    sudo npm install -g @angular/cli
    

    In case it fails

    Delete node_modules folder and package-lock.json file from your project directory Run the below commands in the given order-

    npm install
    
    npm install --save-dev @angular-devkit/build-angular
    
    npm link
    

提交回复
热议问题