Skip to content

Commit 4d1ae14

Browse files
committed
Ignore warnings that we can't control
1 parent 183c763 commit 4d1ae14

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

react-native-scripts/src/util/packager.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ async function cleanUpPackager(projectDir) {
5252
}
5353
}
5454

55+
function shouldIgnoreMsg(msg) {
56+
return (
57+
msg.indexOf('Duplicate module name: bser') >= 0 ||
58+
msg.indexOf('Duplicate module name: fb-watchman') >= 0 ||
59+
msg.indexOf('Warning: React.createClass is no longer supported') >= 0 ||
60+
msg.indexOf('Warning: PropTypes has been moved to a separate package') >= 0
61+
);
62+
}
63+
5564
function run(onReady: () => ?any, options: Object = {}) {
5665
let packagerReady = false;
5766
let needsClear = false;
@@ -60,6 +69,16 @@ function run(onReady: () => ?any, options: Object = {}) {
6069
const projectDir = process.cwd();
6170

6271
const handleLogChunk = chunk => {
72+
// pig, meet lipstick
73+
// 1. https://github.com/facebook/react-native/issues/14620
74+
// 2. https://github.com/facebook/react-native/issues/14610
75+
// 3. https://github.com/react-community/create-react-native-app/issues/229#issuecomment-308654303
76+
// @ide is investigating 3), the first two are upstream issues that will
77+
// likely be resolved by others
78+
if (shouldIgnoreMsg(chunk.msg)) {
79+
return;
80+
}
81+
6382
// we don't need to print the entire manifest when loading the app
6483
if (chunk.msg.indexOf(' with appParams: ') >= 0) {
6584
if (needsClear) {

0 commit comments

Comments
 (0)