You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello.
I have a question about the library. The last release I see is 3 years old, however in master it is updated to be compatible with version 14 of angular.
Can you tell me how I can use this library with angular 14?
Thanks.
Reacted by KOVIKO, Matheus Chaves Ribeiro, Brian Turchyn, Stéphane Finot and hangedman
I haven't seen much movement in this repo recently unfortunately, so I'm not sure when/if a new version will be updated.
In general though, NPM can install packages from GitHub repos with the following syntax:
# From the main/master primary branch
npm install neroniaky/angular-token # main/master# From a specific branch
npm install neroniaky/angular-token#branch
This prompted me to start looking for a solution—other than --force or --legacy-peer-deps—to this issue and I've found something that works for me!
As of NPM 8 (~8.3), there's been the ability to set overrides in package.json to override dependencies of your dependencies. Personally, I had no idea. 🤣 You can manually set version strings, or you can use the special character $ to reference whatever version you are currently using in dependencies.
It's worth noting that the overrides section of the config does not appear to have any effect on the resulting package-lock.json/npm-shrinkwrap.json. As such, if you want to be able to run npm ci, you must include the package.json in your container. The package-lock.json/npm-shrinkwrap.json file is not enough.
I also personally found that I had to include tslint in my devDependencies for angular-token to install via this method. The error messages from NPM made this abundantly clear, however.
Activity
b-turchyn commentedon Nov 4, 2022
I haven't seen much movement in this repo recently unfortunately, so I'm not sure when/if a new version will be updated.
In general though, NPM can install packages from GitHub repos with the following syntax:
KOVIKO commentedon Nov 16, 2022
@b-turchyn Were you able to actually do that for this repo and then make use of it?
When I try, it creates an
angular-token-appdirectory innode_modulesthat is nothing but*.jsonfiles,*.mdfiles, config files, etc.KOVIKO commentedon Nov 17, 2022
This prompted me to start looking for a solution—other than
--forceor--legacy-peer-deps—to this issue and I've found something that works for me!As of NPM 8 (~8.3), there's been the ability to set
overridesinpackage.jsonto override dependencies of your dependencies. Personally, I had no idea. 🤣 You can manually set version strings, or you can use the special character$to reference whatever version you are currently using independencies.It's worth noting that the
overridessection of the config does not appear to have any effect on the resultingpackage-lock.json/npm-shrinkwrap.json. As such, if you want to be able to runnpm ci, you must include thepackage.jsonin your container. Thepackage-lock.json/npm-shrinkwrap.jsonfile is not enough.I also personally found that I had to include
tslintin mydevDependenciesforangular-tokento install via this method. The error messages from NPM made this abundantly clear, however.