locked
Angular 2 error. RRS feed

  • Question

  • User1421620300 posted

    Whenever i run my Angular2 project in node.js  coomand line, i receive the following error. Can someone please explain! Thanks, Markus

    Check below for second error:


    Local workspace file ('angular.json') could not be found.
    Error: Local workspace file ('angular.json') could not be found.
    at WorkspaceLoader._getProjectWorkspaceFilePath (C:\Users\Andrew\AppData\Roaming\npm\node_modules\@angular\cli\models\workspace-loader.js:37:19)
    at WorkspaceLoader.loadWorkspace (C:\Users\Andrew\AppData\Roaming\npm\node_modules\@angular\cli\models\workspace-loader.js:24:21)
    at ServeCommand._loadWorkspaceAndArchitect (C:\Users\Andrew\AppData\Roaming\npm\node_modules\@angular\cli\models\architect-command.js:180:32)
    at ServeCommand.<anonymous> (C:\Users\Andrew\AppData\Roaming\npm\node_modules\@angular\cli\models\architect-command.js:47:25)
    at Generator.next (<anonymous>)
    at C:\Users\Andrew\AppData\Roaming\npm\node_modules\@angular\cli\models\architect-command.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (C:\Users\Andrew\AppData\Roaming\npm\node_modules\@angular\cli\models\architect-command.js:3:12)
    at ServeCommand.initialize (C:\Users\Andrew\AppData\Roaming\npm\node_modules\@angular\cli\models\architect-command.js:46:16)
    at Object.<anonymous> (C:\Users\Andrew\AppData\Roaming\npm\node_modules\@angular\cli\models\command-runner.js:87:23)

    Second Error:

    After checking my angular install i receive this info! Whats is the Angular and webpack error saying? Markus

    Angular CLI: 6.0.8
    Node: 10.4.1
    OS: win32 x64
    Angular: <error>
    ... common, compiler, core, forms, http, platform-browser
    ... platform-browser-dynamic, router

    Package Version
    -----------------------------------------------------------
    @angular-devkit/architect 0.6.8
    @angular-devkit/build-angular 0.6.8
    @angular-devkit/build-optimizer 0.6.8
    @angular-devkit/core 0.6.8
    @angular-devkit/schematics 0.6.8 (cli-only)
    @ngtools/webpack 6.0.8
    @schematics/angular 0.6.8 (cli-only)
    @schematics/update 0.6.8 (cli-only)
    rxjs 6.2.1 (cli-only)
    typescript 2.9.2
    webpack <error>

    Thursday, July 5, 2018 10:15 PM

Answers

All replies

  • User1421620300 posted

    This project does not run. i really just need help with finding the dependencies that i may need! Markus

    see above:

    Thursday, July 5, 2018 10:22 PM
  • User1724605321 posted

    Hi Markus33,

    What is the version of angular cli , you can check version using "ng --version" .  The first error  may occur due to angular cli version:

    New configuration format. The new file can be found at angular.json (but .angular.json is also accepted). Running ng update on a CLI 1.7 project will move you to the new configuration.

    Please refer to below link for solutions :

    https://stackoverflow.com/questions/49810580/error-local-workspace-file-angular-json-could-not-be-found 

    You can aslo refer to below articles for Angular 2 tutorials:

    https://www.tutorialspoint.com/angular2/angular2_environment.htm 

    https://dzone.com/articles/setting-up-your-first-angular-2-project 

    Best Regards,

    Nan Yu

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 6, 2018 2:16 AM
  • User1421620300 posted

    Nan, i tired to do the update --all and here is the errors  that i receive! Markus

    Package "extract-text-webpack-plugin" has an incompatible peer dependency to "webpack" (requires "^3.1.0", would install "4.15.1")
    Package "foundation-sites" has a missing peer dependency of "what-input" @ ">=4.1.0".
    Package "extract-text-webpack-plugin" has an incompatible peer dependency to "webpack" (requires "^3.1.0", would install "4.15.1").

    Friday, July 6, 2018 7:50 PM
  • User1421620300 posted

    I have did some updates. And after running npm start command i am down to these two errors! Markus"

    ERROR in Cannot find module 'node-sass'
    webpack: Failed to compile.

    Friday, July 6, 2018 8:09 PM
  • User1724605321 posted

    Hi Markus33,

    That error is for node-sass is not present try to run following command

    npm install node-sass

    Best Regards,

    Nan Yu

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 9, 2018 5:51 AM