Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property pipe of undefined #70

Open
nandorojo opened this issue Nov 21, 2021 · 3 comments
Open

Cannot read property pipe of undefined #70

nandorojo opened this issue Nov 21, 2021 · 3 comments

Comments

@nandorojo
Copy link

npx react-native-bundle-visualizer


npx: installed 80 in 3.004s
Generating bundle...
React-native binary could not be located. Please report this issue with environment info to:
 -> [object Object]
Cannot read property 'pipe' of undefined
(node:94064) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received undefined
    at validateString (internal/validators.js:124:11)
    at normalizeSpawnArguments (child_process.js:411:3)
    at Object.spawn (child_process.js:551:13)
    at execa (/Users/fernandorojo/.npm/_npx/94064/lib/node_modules/react-native-bundle-visualizer/node_modules/execa/index.js:83:26)
    at Object.<anonymous> (/Users/fernandorojo/.npm/_npx/94064/lib/node_modules/react-native-bundle-visualizer/src/react-native-bundle-visualizer.js:114:23)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:94064) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:94064) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections th

Any idea what this might be? I'm using Expo SDK 43 in a monorepo. I'm running the command from apps/expo. I have react native 0.64.3.

@IjzerenHein
Copy link
Owner

Auch, this must have happened because of the new yarn workspace changes:
b9e1fe6
#69

Could you try using v3.0.0, does that also break?

@BrodaNoel
Copy link

I'm getting the same error here.
I stop yarn start and ran npm start and still the same problem

PS.: I'm using Expo

@BrodaNoel
Copy link

Oh! I found a workaround.

I did THIS, and I GOT THE ERROR:

  • In Terminal 1, I ran yarn start
  • In Terminal 2, I ran npx react-native-bundle-visualizer
  • Got the error.
  • Stoped yarn start in Terminal 1
  • I ran npm start in Terminal 1
  • I ran again npx react-native-bundle-visualizer in Terminal 2.
  • I GOT THE ERROR.

But then... I just killed Terminal 2 and ran npx react-native-bundle-visualizer in Terminal 1, and it works.

Seems like there is some temp folder associated to the Terminal opened (zsh)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants