error when running ng serve --open

1

Because I get this error when I run ng serve --open :

  

C: \ wamp64 \ www \ my-app & nt serve --open You seem to not be depending on   "@ angular / core". This is an error.

I do not understand maybe I did something wrong when installing it? , I know it's fine because when I run ng --version I get everything right, the angular version cli etc.

but I do not want to run the ng serve --open

    
asked by DavidIjsud 09.01.2018 в 19:35
source

2 answers

0

Good David! the error seems for lack of Angular packages. Try running in console in your C: \ wamp64 \ www \ my-app directory with:

 npm install

And then try running ng serve --open again.

Greetings.

    
answered by 09.01.2018 в 19:41
0
  • Delete node_modules and package-lock.json, from the "my-app" folder. Where is your project ( C:\wamp64\www\my-app - Below is the structure for you to get oriented).

  • Then run the following command, update the npm packages.

    npm install

Recommendations:

Then check the package.json and make sure there is the following line "@angular/core": "5.0.4" (the version may vary, quiet)

The structure of the self-generated project should be like this, so you can orient yourself:

Another recommendation when you install Angular, I recommend doing global for any problem:

npm install -g @angular/cli // -g Refers to a global installation.

    
answered by 10.01.2018 в 13:36