Patch next build false error about @types/react

This commit is contained in:
David Ernst
2022-07-30 18:43:26 -07:00
parent 2696ca8f49
commit 9ea01a50c0
2 changed files with 17 additions and 0 deletions

View File

@@ -8,6 +8,7 @@
"dev": "next dev",
"e2e": "cypress run --config-file cypress/cypress-config.json",
"format": "prettier --write **/*.{js,ts,tsx}",
"postinstall": "patch-package",
"lint": "eslint . --ext ts --ext tsx --ext js",
"start": "next start",
"test": "yarn lint && yarn typecheck && yarn e2e",
@@ -57,7 +58,9 @@
"moment": "^2.29.1",
"next": "11",
"next-transpile-modules": "8",
"patch-package": "^6.4.7",
"pdf-lib": "^1.16.0",
"postinstall-postinstall": "^2.1.0",
"pusher": "^4.0.2",
"pusher-js": "^7.0.2",
"react": "^17",

14
patches/next+11.1.4.patch Normal file
View File

@@ -0,0 +1,14 @@
diff --git a/node_modules/next/dist/lib/typescript/missingDependencyError.js b/node_modules/next/dist/lib/typescript/missingDependencyError.js
index 6c0cf4f..41e37c7 100644
--- a/node_modules/next/dist/lib/typescript/missingDependencyError.js
+++ b/node_modules/next/dist/lib/typescript/missingDependencyError.js
@@ -18,7 +18,7 @@ function missingDepsError(dir, missingPackages) {
const packagesCli = missingPackages.map((p)=>p.pkg
).join(' ');
const removalMsg = '\n\n' + _chalk.default.bold('If you are not trying to use TypeScript, please remove the ' + _chalk.default.cyan('tsconfig.json') + ' file from your package root (and any TypeScript files in your pages directory).');
- throw new _fatalError.FatalError(_chalk.default.bold.red(`It looks like you're trying to use TypeScript but do not have the required package(s) installed.`) + '\n\n' + _chalk.default.bold(`Please install ${_chalk.default.bold(packagesHuman)} by running:`) + '\n\n' + `\t${_chalk.default.bold.cyan(((0, _isYarn).isYarn(dir) ? 'yarn add --dev' : 'npm install --save-dev') + ' ' + packagesCli)}` + removalMsg + '\n');
+ // throw new _fatalError.FatalError(_chalk.default.bold.red(`It looks like you're trying to use TypeScript but do not have the required package(s) installed.`) + '\n\n' + _chalk.default.bold(`Please install ${_chalk.default.bold(packagesHuman)} by running:`) + '\n\n' + `\t${_chalk.default.bold.cyan(((0, _isYarn).isYarn(dir) ? 'yarn add --dev' : 'npm install --save-dev') + ' ' + packagesCli)}` + removalMsg + '\n');
}
//# sourceMappingURL=missingDependencyError.js.map
\ No newline at end of file