preboot / angular-webpack

A complete, yet simple, starter for Angular v2+ using webpack
MIT License
1.29k stars 561 forks source link

Project will not build after doing NPM install. #322

Closed aaronbalthaser closed 7 years ago

aaronbalthaser commented 7 years ago

After another team member cloned the repo and attempted to build the project we ran into issues.

npm WARN @angular/common@2.2.0 requires a peer of @angular/core@2.2.0 but none was installed. npm WARN @angular/core@2.4.10 requires a peer of rxjs@^5.0.1 but none was installed. npm WARN @angular/core@2.4.10 requires a peer of zone.js@^0.7.2 but none was installed. npm WARN @angular/forms@2.2.0 requires a peer of @angular/core@2.2.0 but none was installed. npm WARN @angular/http@2.2.0 requires a peer of @angular/core@2.2.0 but none was installed. npm WARN @angular/platform-browser@2.2.0 requires a peer of @angular/core@2.2.0 but none was installed. npm WARN @angular/platform-browser-dynamic@2.2.0 requires a peer of @angular/core@2.2.0 but none was installed. npm WARN @angular/platform-browser-dynamic@2.2.0 requires a peer of @angular/compiler@2.2.0 but none was installed. npm WARN @angular/router@3.2.0 requires a peer of @angular/core@2.2.0 but none was installed. npm WARN @angular/router@3.2.0 requires a peer of @angular/upgrade@2.2.0 but none was installed. npm WARN @angular/upgrade@2.4.10 requires a peer of @angular/platform-browser@2.4.10 but none was installed. npm WARN @angular/upgrade@2.4.10 requires a peer of @angular/platform-browser-dynamic@2.4.10 but none was installed. npm WARN codelyzer@1.0.0-beta.3 requires a peer of @angular/compiler@~2.1.1 but none was installed. npm WARN codelyzer@1.0.0-beta.3 requires a peer of @angular/core@~2.1.1 but none was installed.

What do I have to do to get resolve these dependency issues?

mcescalante commented 7 years ago

These are all warnings, can you post the full command you ran and traceback from trying to run the application? You should give it another shot with Angular bumped to 4 (latest commits in this repository) as well.

aaronbalthaser commented 7 years ago

Thanks. I had done that after posting this. Update was the obvious choice. Should not have wasted your time. My bad.

mcescalante commented 7 years ago

Sounds like this is handled via an update, feel free to comment if you need any additional help, but I'm going to close this.

vinaymorkar commented 7 years ago

could you please explain the steps?

mcescalante commented 7 years ago

@vinaymorkar what issues are you having? these were all warnings and what fixed it was cloning a fresh copy of the latest code and re-running everything

aaronbalthaser commented 7 years ago

I actually just diffed the files and made the changes manually so I understood what had changed. If I remember correctly there were some changes with tslint and something in the web pack config. I also added yarn wrapping npm to prevent this from happening again.

vinaymorkar commented 7 years ago

@mcescalante ya but after doing npm start it was throwing errors and most of them were related to missing/incorrect dependencies in package.json file. But installing latest angular-cli globally and then updating latest packages locally resolved my issue. Global package:

npm uninstall -g @angular/cli npm cache clean npm install -g @angular/cli@latest

Local project package:

rm -rf node_modules dist # use rmdir /S/Q node_modules dist in Windows Command Prompt; use rm -r -fo node_modules,dist in Windows PowerShell npm install --save-dev @angular/cli@latest npm install

vinaymorkar commented 7 years ago

Note

use rmdir /S/Q node_modules dist in Windows Command Prompt; use rm -r -fo node_modules,dist in Windows PowerShell

Above is commented part.

mcescalante commented 7 years ago

Interesting - this repo doesn't use angular-cli so I'm not sure why that was part of the solution, but glad to hear that some node_modules work and updating fixed it 😄

aaronbalthaser commented 7 years ago

Lol, maybe Angular CLI has super powers we don't know about. :)