mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Workaround to avoid installing npm when creating a new project on Windows (Fixes #11040)
This commit is contained in:
@@ -837,12 +837,15 @@ main.registerCommand({
|
|||||||
// the packages (or maybe an unpredictable subset based on what happens to be
|
// the packages (or maybe an unpredictable subset based on what happens to be
|
||||||
// in the template's versions file).
|
// in the template's versions file).
|
||||||
|
|
||||||
// Since some of the project skeletons include npm `devDependencies`, we need
|
const isWindows = process.platform === "win32";
|
||||||
// to make sure they're included when running `npm install`.
|
if (!isWindows) {
|
||||||
require("./default-npm-deps.js").install(
|
// Since some of the project skeletons include npm `devDependencies`, we need
|
||||||
appPath,
|
// to make sure they're included when running `npm install`.
|
||||||
{ includeDevDependencies: true }
|
require("./default-npm-deps.js").install(
|
||||||
);
|
appPath,
|
||||||
|
{includeDevDependencies: true}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
var appNameToDisplay = appPathAsEntered === "." ?
|
var appNameToDisplay = appPathAsEntered === "." ?
|
||||||
"current directory" : `'${appPathAsEntered}'`;
|
"current directory" : `'${appPathAsEntered}'`;
|
||||||
@@ -873,6 +876,10 @@ main.registerCommand({
|
|||||||
cmd("cd " + appPathWithQuotesIfSpaces);
|
cmd("cd " + appPathWithQuotesIfSpaces);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isWindows) {
|
||||||
|
cmd("meteor npm install");
|
||||||
|
}
|
||||||
|
|
||||||
cmd("meteor");
|
cmd("meteor");
|
||||||
|
|
||||||
Console.info("");
|
Console.info("");
|
||||||
|
|||||||
Reference in New Issue
Block a user