Last post Dec 31, 2017 05:06 PM by B2BNeophyte
Dec 27, 2017 04:38 PM|B2BNeophyte|LINK
I've looked around the internet as best I can and I can't seem to find anything on how the SPA templates are to be updated to current versions of Angular.
As of right now my projects are still getting created in Angular 4.2.5 and I figured out the problem after seeing that updates to npm had no effect and when I created an Angular CLI project it came out in 5.0.0
Is this information supposed to be updating automatically? If so what's broken in my .Net Core 2.0 and if not what's the procedure for bringing the SPA templates current?
Dec 27, 2017 04:57 PM|B2BNeophyte|LINK
I'll add this much to my question. I found this earlier:
If I try the PM command line I'm told I need the project open, if I open a project made with the previous template I'm told that it can't be installed because the project isn't compatible. Seems like a catch 22.
Dec 27, 2017 07:08 PM|B2BNeophyte|LINK
Another update - I decided to try, really as a drastic measure, uninstalling and reinstalling VS2017. I'm getting the same result in that the package.json still starts off with all of my Angular as 4.2.5.
Dec 27, 2017 07:37 PM|ryanbesko|LINK
Is this any help?
Dec 27, 2017 07:48 PM|B2BNeophyte|LINK
ryan - TY.
If I understand that article correctly this is expected behavior and I'd need to either wait till January or go about building my projects in a different manner.
Dec 27, 2017 08:11 PM|bruce (sqlwork.com)|LINK
the package.json specifies the version of angular to install. you just update the version numbers in here or run "npm update".
There is no automatic update to npm packages. This is similar to nuget where you install a version. you manually update the version to get a new version. this keeps you code from breaking, and updates may include breaking api changes. also an update may
require a new package of a shared component not supported by the other components.
Of course until a new release of the template, it will always start with the version it was built with. which will probably be out of date on the release date.
note: I generally update all the packages after a major release of my code. This gives lots of stability during the dev cycle, but still allows using new features.
Dec 27, 2017 08:25 PM|B2BNeophyte|LINK
TY. As far as I remember, when I've tried this, it takes updating both package.json manually and every corresponding line in npm shrinkwrap. I'll give it a try and see if that gets me where I need to end up.
Dec 28, 2017 06:03 PM|bruce (sqlwork.com)|LINK
the point of shrinkwrap is to lockdown the versions of the components, so your build will not get updates. you should delete your shinkwrap file, delete the node_modules folder, update packages.json to the versions you want. then "npm install". test the
code, if all is good, create a new shrink-wrap file "npm shrinkwrap".
Dec 31, 2017 05:06 PM|B2BNeophyte|LINK
bruce, thank you for that insight. If I can delete my shrinkwrap and rebuilt it from the command line that makes this process a lot easier.