Changes

Jump to navigation Jump to search
604 bytes added ,  11:42, 24 May 2022
m
Line 23: Line 23:  
npm install
 
npm install
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
===Fix broken===
 +
<syntaxhighlight lang="bash">
 +
npm cache clean --force
 +
rm -rf node_modules
 +
# rm package-lock.json  # If not updating packages
 +
# npm install
 +
</syntaxhighlight>
 +
 +
==package.json==
 +
~ only allows patch updates
 +
 +
^ only allows minor version update
 +
 +
<nowiki>*</nowiki> allows mayor version upgrades<syntaxhighlight lang="json">
 +
"dependencies": {
 +
    "@angular/animations": "^12.2.9",
 +
    "@angular/cdk": "~12.2.9",
 +
    "@angular/common": "*"
 +
}
 +
</syntaxhighlight>
 +
 
==npm Behind Proxy==
 
==npm Behind Proxy==
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
npm config set http-proxy http://user:pass@proxy.example.com:3128
 
npm config set http-proxy http://user:pass@proxy.example.com:3128
 
npm config set https-proxy http://user:pass@proxy.example.com:3128
 
npm config set https-proxy http://user:pass@proxy.example.com:3128
 +
</syntaxhighlight>
 +
 +
== npm cli ==
 +
<syntaxhighlight lang="bash">
 +
npm view <packagename> versions --json
 +
npm install jquery@"^1.9.0"
 
</syntaxhighlight>
 
</syntaxhighlight>

Navigation menu