Hi,
After upgrading to v.4.0 Asp.net core with angular 2 any packages that I add to package.json are not installed. An example is primeng: "4.0.0". The only packages that are installed are the ones that come with aspnetzero. Any other package that I add afterwards is not being installed
Thanks
5 Answer(s)
-
0
Hi,
I think it is because we use yarn and npm-shrinkwrap. But if you add packages using "npm install --save", it should be installed.
Can you explain how do you install new npm packages ? Do you write their name and version to packages.json ?
Thanks.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi,
In package.json I write:
"primeng": "4.0.0"
and then fireup npm install
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi,
We have npm-shrinkwrap.json and yarn.lock files in the project. When you run "npm install" it install packages according to npm-shrinkwrap.json file.
So when you make a change on packages.json manually, your packages are not installed because of that. You can try to install your packages with npm install or you can remove npm-shrinkwrap.json fiel from your solution.
Thanks.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Removing npm-shrinkwrap.json will have any effects? I mean what is the actual reason you added this file
Thanks
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi,
It might have. It is used to lock package versions with the ones we used for development.
For example, let's say you have angular 4.0.3 in npm-shrinkwrap.json and when you run npm install it will always install 4.0.3. If you remove npm-shrinkwrap.json, npm install is going to install latest version of angular starting with 4...
Normally, npm packages uses semantic versioning and it means no breaking change in such update but it happens a lot according to our experince :).
Thanks.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)