How to set npm-cache directory relative to node.exe location dynamicallyChange default global installation directory for node.js modules in Windows?How can I change the cache path for npm (or completely disable the cache) on Windows?How can I update NodeJS and NPM to the next versions?Node.js: How to install NPMHow do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)How to uninstall npm modules in node js?How can I change the cache path for npm (or completely disable the cache) on Windows?How do I uninstall a package installed using npm link?How to use npm in an environment with restricted internet accessHow do I install npm packages in specific directoryDoes npm cache packages?How to Use npm cache on Server with Multiple Build Agents
How do I explain to a team that the project they will work on for six months will certainly be cancelled?
Dropdowns & Chevrons for Right to Left languages
How does The Fools Guild make its money?
Generator for parity?
As a 16 year old, how can I keep my money safe from my mother?
Max Order of an Isogeny Class of Rational Elliptic Curves is 8?
Team goes to lunch frequently, I do intermittent fasting but still want to socialize
Why did Gandalf use a sword against the Balrog?
Can I legally make a real mobile app based on a fictional app from a TV show?
When do triples have been called monads for the first time?
Are there any financial disadvantages to living significantly "below your means"?
How to mark beverage cans in a cooler for a blind person?
Optimal way to extract "positive part" of a multivariate polynomial
How many different ways are there to checkmate in the early game?
Does this Foo machine halt?
Am I overreacting to my team leader's unethical requests?
TColorBox and Tikz, arrows are not on the diagram
Why aren’t emergency services using callsigns?
Y2K... in 2019?
Why couldn't soldiers sight their own weapons without officers' orders?
Performance of a branch and bound algorithm VS branch-cut-heuristics
Was the 2019 Lion King film made through motion capture?
Why does Intel's Haswell chip allow FP multiplication to be twice as fast as addition?
Why doesn't the "ch" pronunciation rule occur for words such as "durch" and "manchmal"?
How to set npm-cache directory relative to node.exe location dynamically
Change default global installation directory for node.js modules in Windows?How can I change the cache path for npm (or completely disable the cache) on Windows?How can I update NodeJS and NPM to the next versions?Node.js: How to install NPMHow do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)How to uninstall npm modules in node js?How can I change the cache path for npm (or completely disable the cache) on Windows?How do I uninstall a package installed using npm link?How to use npm in an environment with restricted internet accessHow do I install npm packages in specific directoryDoes npm cache packages?How to Use npm cache on Server with Multiple Build Agents
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have read on this question and also here on how to configure npm-folders so to install and have node packages in a desired location. but setting the npm config set cache
or giving a prefix
in npmrc just sets the directory statically e.g : "C:localnpm-cache"
so i wanted to know how i can set the prefix
value or npm-cache config settings that always the npm packages will be installed in a folder relative to node.exe
so it will make the whole node a portable utility with offline packages shipped with this.
node.js
add a comment |
I have read on this question and also here on how to configure npm-folders so to install and have node packages in a desired location. but setting the npm config set cache
or giving a prefix
in npmrc just sets the directory statically e.g : "C:localnpm-cache"
so i wanted to know how i can set the prefix
value or npm-cache config settings that always the npm packages will be installed in a folder relative to node.exe
so it will make the whole node a portable utility with offline packages shipped with this.
node.js
add a comment |
I have read on this question and also here on how to configure npm-folders so to install and have node packages in a desired location. but setting the npm config set cache
or giving a prefix
in npmrc just sets the directory statically e.g : "C:localnpm-cache"
so i wanted to know how i can set the prefix
value or npm-cache config settings that always the npm packages will be installed in a folder relative to node.exe
so it will make the whole node a portable utility with offline packages shipped with this.
node.js
I have read on this question and also here on how to configure npm-folders so to install and have node packages in a desired location. but setting the npm config set cache
or giving a prefix
in npmrc just sets the directory statically e.g : "C:localnpm-cache"
so i wanted to know how i can set the prefix
value or npm-cache config settings that always the npm packages will be installed in a folder relative to node.exe
so it will make the whole node a portable utility with offline packages shipped with this.
node.js
node.js
edited Jul 7 at 13:56
yekanchi
asked Mar 27 at 7:29
yekanchiyekanchi
5506 silver badges22 bronze badges
5506 silver badges22 bronze badges
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55371878%2fhow-to-set-npm-cache-directory-relative-to-node-exe-location-dynamically%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55371878%2fhow-to-set-npm-cache-directory-relative-to-node-exe-location-dynamically%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown