mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Use npm instal --force to get around NPM cache corruption bug.
This commit is contained in:
@@ -335,8 +335,17 @@ _.extend(exports, {
|
||||
// We don't use npm.commands.install since we couldn't
|
||||
// figure out how to silence all output (specifically the
|
||||
// installed tree which is printed out with `console.log`)
|
||||
//
|
||||
// We use --force, because the NPM cache is broken! See
|
||||
// https://github.com/isaacs/npm/issues/3265 Basically, switching back and
|
||||
// forth between a tarball fork of version X and the real version X can
|
||||
// confuse NPM. But the main reason to use tarball URLs is to get a fork of
|
||||
// the latest version with some fix, so it's easy to trigger this! So
|
||||
// instead, always use --force. (Even with --force, we still WRITE to the
|
||||
// cache, so we can corrupt the cache for other invocations of npm... ah
|
||||
// well.)
|
||||
this._execFileSync(path.join(files.get_dev_bundle(), "bin", "npm"),
|
||||
["install", installArg],
|
||||
["install", "--force", installArg],
|
||||
{cwd: dir});
|
||||
},
|
||||
|
||||
@@ -346,9 +355,10 @@ _.extend(exports, {
|
||||
|
||||
this._ensureConnected();
|
||||
|
||||
// `npm install`, which reads npm-shrinkwrap.json
|
||||
// `npm install`, which reads npm-shrinkwrap.json.
|
||||
// see above for why --force.
|
||||
this._execFileSync(path.join(files.get_dev_bundle(), "bin", "npm"),
|
||||
["install"],
|
||||
["install", "--force"],
|
||||
{cwd: dir});
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user