react-native-bundle-visualizer icon indicating copy to clipboard operation
react-native-bundle-visualizer copied to clipboard

Getting error command failed.

Open neel-dedhia opened this issue 5 years ago • 5 comments

Hey @IjzerenHein I am using RN-0.63. I am getting a few exceptions when running the command. Command : ./node_modules/.bin/react-native-bundle-visualizer --verbose --platform android --dev true --entry-file ./index.js Output: Generating bundle... (node:11773) UnhandledPromiseRejectionWarning: TypeError: Command failed: ./node_modules/.bin/react-native bundle --platform android --dev true --entry-file ./index.js --bundle-output /tmp/react-native-bundle-visualizer/LearnRN/android.bundle --sourcemap-output /tmp/react-native-bundle-visualizer/LearnRN/android.bundle.map timedPromise.finally is not a function at setExitHandler (/home/neel/workspace/LearnRN/app/LearnRN/node_modules/react-native-bundle-visualizer/node_modules/execa/lib/kill.js:102:29) at execa (/home/neel/workspace/LearnRN/app/LearnRN/node_modules/react-native-bundle-visualizer/node_modules/execa/index.js:100:22) at Object.<anonymous> (/home/neel/workspace/LearnRN/app/LearnRN/node_modules/react-native-bundle-visualizer/src/react-native-bundle-visualizer.js:90:23) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Function.Module.runMain (module.js:693:10) at startup (bootstrap_node.js:188:16) (node:11773) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3) (node:11773) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Can you please let me know the solution for this.

neel-dedhia avatar Sep 26 '20 12:09 neel-dedhia

+1

leonimurilo avatar Nov 01 '20 04:11 leonimurilo

Hmm interesting. Which node version are you using?

IjzerenHein avatar Aug 03 '21 10:08 IjzerenHein

I have the same problem with node v18.2.0 & ReactNative v0.66.1.

SMhdAsadi avatar May 21 '22 14:05 SMhdAsadi

Same problem, exact output:

node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>".] {
  code: 'ERR_UNHANDLED_REJECTION'
}

Node.js v18.0.0

yadigar-prospr avatar Sep 13 '22 09:09 yadigar-prospr

UPDATE ##FIX

Hey everyone, I was just trying possible solutions, and when I downgrade my node version to 16.4.0 it worked like charm. For anyone in to this issue 🥳

yadigar-prospr avatar Sep 13 '22 09:09 yadigar-prospr

I made a potential fix https://github.com/IjzerenHein/react-native-bundle-visualizer/issues/112

LinFeiLong avatar Dec 25 '22 12:12 LinFeiLong

The error you guys are facing, it happens on node version 18. A couple of days ago we fixed this https://github.com/IjzerenHein/react-native-bundle-visualizer/pull/101. We will be releasing a newer version of this package shortly which will fix this. 🙂

hurali97 avatar Dec 28 '22 12:12 hurali97