vscode-react-native icon indicating copy to clipboard operation
vscode-react-native copied to clipboard

The React Native package generation tool could not be started(error code:106)

Open iosToTop opened this issue 6 years ago • 13 comments

Actual Behavior

  1. The React Native package generation tool could not be started(error code:106)

Expected Behavior

  1. When i start the react native package by extension command.

Software versions

  • React-Native VS Code extension version:
  • VSCode version: 1.44.2
  • OS platform and version: 10.14.5
  • NodeJS version: 12.8.1
  • React Native version: 0.55.4
  • Expo SDK version (include if relevant):

Outputs (Include if relevant)

  • Output of the Debug Console (View -> Toggle Debug Console):
Stack: Error: 未能启动 React Native 包生成工具 (error code 106): 无法启动包生成工具。
    at Function.getWrappedError (/Users/Mr.hu/.vscode/extensions/msjsdiag.vscode-react-native-0.15.0/src/common/error/internalError.js:35:16)
    at Function.wrapError (/Users/Mr.hu/.vscode/extensions/msjsdiag.vscode-react-native-0.15.0/src/common/error/errorHelper.js:17:44)
    at /Users/Mr.hu/.vscode/extensions/msjsdiag.vscode-react-native-0.15.0/src/common/entryPointHandler.js:43:72
    at _rejected (/Users/Mr.hu/.vscode/extensions/msjsdiag.vscode-react-native-0.15.0/node_modules/q/q.js:844:24)
    at /Users/Mr.hu/.vscode/extensions/msjsdiag.vscode-react-native-0.15.0/node_modules/q/q.js:870:30
    at Promise.when (/Users/Mr.hu/.vscode/extensions/msjsdiag.vscode-react-native-0.15.0/node_modules/q/q.js:1122:31)
    at Promise.promise.promiseDispatch (/Users/Mr.hu/.vscode/extensions/msjsdiag.vscode-react-native-0.15.0/node_modules/q/q.js:788:41)
    at /Users/Mr.hu/.vscode/extensions/msjsdiag.vscode-react-native-0.15.0/node_modules/q/q.js:604:44
    at runSingle (/Users/Mr.hu/.vscode/extensions/msjsdiag.vscode-react-native-0.15.0/node_modules/q/q.js:137:13)
    at flush (/Users/Mr.hu/.vscode/extensions/msjsdiag.vscode-react-native-0.15.0/node_modules/q/q.js:125:13)
    at processTicksAndRejections (internal/process/task_queues.js:75:11)

If my mac connected office wifi.I use extension to start the react native package manager.The problem is show.But when i connected to my iPhone 4G wifi.That’s no problem.So i don't know what's the question.

iosToTop avatar Apr 30 '20 01:04 iosToTop

https://i.loli.net/2020/04/30/DRmBTXW8l94F6G3.png And when i click the red circle button.Vscode show 'command " not found'

iosToTop avatar Apr 30 '20 01:04 iosToTop

error img Sorry,this is the error image

iosToTop avatar Apr 30 '20 02:04 iosToTop

Hi @iosToTop and thanks for reaching us. It seems that the packager freezes while starting. Could you please try to run the packager using React Native CLI command npx react-native start at the same conditions when you got the error? Please let us know about your results.

RedMickey avatar Apr 30 '20 09:04 RedMickey

Hi, I have same error. When starting with the start button, but when I start with npm start -- --reset-cache it works. Debugging on VSCode not works, it opens chrome debugger.

Screen Shot 2020-05-05 at 15 12 52

@RedMickey @iosToTop

keremcubuk avatar May 05 '20 12:05 keremcubuk

Hi @keremcubuk, when you start the packager from terminal using React Native command, the default Chrome debugger will be launched. The extension launches the packager with some special environment variables keys that will not allow to launch Chrome for debugging. It's required to disable Chrome debugger to be able to debug an app via the extension. You can do the following to disable Chrome debugger, if you launched an RN app using RN CLI command:

  1. Open dev menu on an emulator or device
  2. Click Stop debugging button
  3. Close debugger tab in Google Chrome
  4. In VS Code launch debug scenario Attach to packager
  5. Open dev menu on an emulator or device and click Debug button

So the extension's debugger should attach to an application.

But if after that the problem still remains, we'll need some additional information to look through it more deeply. So, could you please fill in the following form and send us the logs?

Software versions

  • React-Native VS Code extension version:
  • VSCode version:
  • OS platform and version:
  • NodeJS version:
  • React Native version:
  • Expo SDK version (include if relevant):

Outputs (Include if relevant)

  • Output of the Debug Console (View -> Toggle Debug Console):
PASTE OUTPUT HERE
  • Output of the React-Native output channel (View -> Toggle Output -> Select React-Native in ListBox):
PASTE OUTPUT HERE
  • Output of the Developer Tools console (Help -> Toggle Developer Tools -> Select Console tab):
PASTE OUTPUT HERE

RedMickey avatar May 06 '20 10:05 RedMickey

@RedMickey When i use npx react-native start on the bash.It's no error. I think the problem is: 1.Why that's no error when my mac connected iphone 4G. 2.Why i click restart package manager button.Vscode show command "" not found.

iosToTop avatar May 07 '20 08:05 iosToTop

I solved with updating to all package.json libraries and delete package-lock.json. I think something was wrong with the some packages. And also, never use npm audit fix

keremcubuk avatar May 07 '20 10:05 keremcubuk

@iosToTop, we probably found out the reason of this problem. This PR is intended to fix packager starting problem. Could you please try VSIX with a fix and let us know how it works for you? To try it please do the following:

  • Download and unzip compiled extension VSIX : vscode-react-native-0.15.0.zip
  • Uninstall extension
  • Close VS Code
  • Open VS Code
  • Click Extensions -> ... -> Install from VSIX... and select downloaded VSIX

But if after that the problem still remains, could you please send us the following logs?

Outputs

  • Output of the Debug Console (View -> Toggle Debug Console):
PASTE OUTPUT HERE
  • Output of the React-Native output channel (View -> Toggle Output -> Select React-Native in ListBox):
PASTE OUTPUT HERE
  • Output of the Developer Tools console (Help -> Toggle Developer Tools -> Select Console tab):
PASTE OUTPUT HERE

RedMickey avatar May 07 '20 14:05 RedMickey

@iosToTop Do you have a chance to look at this?

RedMickey avatar May 13 '20 13:05 RedMickey

@RedMickey Thanks.I will try your suggest tomorrow!

iosToTop avatar May 17 '20 15:05 iosToTop

Hi @iosToTop . React Native Tools v0.16.0 with a fix that we sent to you just have been released, so you can download it from VS Code Marketplace and try it out. Please let us know if this fixed your problem.

SounD120 avatar May 21 '20 12:05 SounD120

@iosToTop Just a friendly ping on this.

SounD120 avatar May 25 '20 07:05 SounD120

@iosToTop Closing this issue due to inactivity. Please feel free to reopen and add more information if the problem still persists.

SounD120 avatar May 26 '20 14:05 SounD120