[79a0317] | 1 | maybeWarn: try {
|
---|
| 2 | var stackTraceLimit = Error.stackTraceLimit;
|
---|
| 3 | Error.stackTraceLimit = Infinity;
|
---|
| 4 | var stack = new Error().stack;
|
---|
| 5 | Error.stackTraceLimit = stackTraceLimit;
|
---|
| 6 | if (!stack.includes("babel-preset-react-app")) break maybeWarn;
|
---|
| 7 |
|
---|
| 8 | // Try this as a fallback, in case it's available in node_modules
|
---|
| 9 | module.exports = require("@babel/plugin-transform-private-property-in-object");
|
---|
| 10 |
|
---|
| 11 | setTimeout(console.warn, 2500, `\
|
---|
| 12 | \x1B[0;33mOne of your dependencies, babel-preset-react-app, is importing the
|
---|
| 13 | "@babel/plugin-proposal-private-property-in-object" package without
|
---|
| 14 | declaring it in its dependencies. This is currently working because
|
---|
| 15 | "@babel/plugin-proposal-private-property-in-object" is already in your
|
---|
| 16 | node_modules folder for unrelated reasons, but it \x1B[1mmay break at any time\x1B[0;33m.
|
---|
| 17 |
|
---|
| 18 | babel-preset-react-app is part of the create-react-app project, \x1B[1mwhich
|
---|
| 19 | is not maintianed anymore\x1B[0;33m. It is thus unlikely that this bug will
|
---|
| 20 | ever be fixed. Add "@babel/plugin-proposal-private-property-in-object" to
|
---|
| 21 | your devDependencies to work around this error. This will make this message
|
---|
| 22 | go away.\x1B[0m
|
---|
| 23 | `);
|
---|
| 24 |
|
---|
| 25 | return;
|
---|
| 26 | } catch (e) {}
|
---|
| 27 |
|
---|
| 28 | throw new Error(`\
|
---|
| 29 | --- PLACEHOLDER PACKAGE ---
|
---|
| 30 | This @babel/plugin-proposal-private-property-in-object version is not meant to
|
---|
| 31 | be imported. Something is importing
|
---|
| 32 | @babel/plugin-proposal-private-property-in-object without declaring it in its
|
---|
| 33 | dependencies (or devDependencies) in the package.json file.
|
---|
| 34 | Add "@babel/plugin-proposal-private-property-in-object" to your devDependencies
|
---|
| 35 | to work around this error. This will make this message go away.
|
---|
| 36 | `);
|
---|