Changes
Jump to navigation
Jump to search
← Older edit
NodeJS
(edit)
Revision as of 11:42, 24 May 2022
604 bytes added
,
11:42, 24 May 2022
m
→Install package in project
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>
Rafahsolis
Bureaucrats
,
Administrators
2,306
edits
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
Variants
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
Special pages
Printable version