fix(gatsby): remove npm_config_legacy_peer_deps (#6698)

This commit is contained in:
Emily Xiong 2021-08-12 12:47:46 -04:00 committed by GitHub
parent 3351ef80bc
commit f96c5371c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 6 deletions

View File

@ -94,7 +94,7 @@ describe('create-nx-workspace', () => {
const wsName = uniq('gatsby');
const appName = uniq('app');
runCreateWorkspace(wsName, {
preset: 'next',
preset: 'gatsby',
style: 'css',
appName,
packageManager,

View File

@ -486,10 +486,6 @@ async function createApp(
nxWorkspaceRoot = `\\"${nxWorkspaceRoot.slice(1, -1)}\\"`;
}
}
// For gatsby, when doing npm install, it does not require the flag --legacy-peer-deps
if (parsedArgs.preset === Preset.Gatsby && packageManager === 'npm') {
process.env.npm_config_legacy_peer_deps = 'false';
}
const fullCommandWithoutWorkspaceRoot = `${pmc.exec} tao ${command}/generators.json --cli=${cli}`;
let workspaceSetupSpinner = ora('Creating your workspace').start();

View File

@ -42,7 +42,6 @@ function updateDependencies(host: Tree) {
});
const isPnpm = host.exists('pnpm-lock.yaml');
process.env.npm_config_legacy_peer_deps = 'false';
return addDependenciesToPackageJson(
host,
{