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

ern create-miniapp fails [Windows] #1527

Closed
dig22 opened this issue Mar 18, 2020 · 19 comments · Fixed by #1543
Closed

ern create-miniapp fails [Windows] #1527

dig22 opened this issue Mar 18, 2020 · 19 comments · Fixed by #1543
Labels

Comments

@dig22
Copy link

dig22 commented Mar 18, 2020

$ ern create-miniapp app

Error: spawn C:\Users\Zapcom_Intern\.ern\versions\0.39.0\node_modules\.bin\yarn ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19) at onErrorNT (internal/child_process.js:456:16) at processTicksAndRejections (internal/process/task_queues.js:81:21)

@IndianNative
Copy link

Facing same issue.
events.js:196
throw er; // Unhandled 'error' event
^

Error: spawn C:\Users.ern\versions\0.40.0\node_modules.bin\yarn ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:266:19)
at onErrorNT (internal/child_process.js:468:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
at onErrorNT (internal/child_process.js:468:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn C:\Users\.ern\versions\0.40.0\node_modules\.bin\yarn',
path: 'C:\Users\.ern\versions\0.40.0\node_modules\.bin\yarn',
spawnargs: [ 'info', 'test-miniapp', 'versions', '--json' ]
}

@IndianNative
Copy link

IndianNative commented Mar 22, 2020

Can anybody provide help here? @friederbluemle @krunalsshah

@friederbluemle
Copy link
Member

Hi @IndianNative and @dig22 - Would you be able to test using version 0.38.16 and let us know if you're still seeing the same issue?

ern platform use 0.38.16

Also, just checking: How did you install the Electrode Native CLI (e.g. using npm or Yarn)?

@IndianNative
Copy link

Hi @friederbluemle thanks for your response - Also I tried using version 0.38.16 but no luck.

Also I installed it using npm.

@krunalsshah
Copy link
Contributor

krunalsshah commented Mar 23, 2020 via email

@friederbluemle
Copy link
Member

It appears to be an issue with spawn.. Can you also try to use bash for WSL?

@IndianNative
Copy link

Hi @krunalsshah .Yes I am using Win OS,. My current versions are
electrode-native: 1.0.17
ern platform: 0.38.16
node version - 9.1.0
react-native-cli: 2.0.1

@IndianNative
Copy link

Hi @friederbluemle , tried git bash for the same but not solved.

image

@friederbluemle
Copy link
Member

Are you able to create a regular React Native app?

npx react-native init test

@IndianNative
Copy link

Ye I am able to create it successfully -
image
image

@IndianNative
Copy link

IndianNative commented Mar 24, 2020

Hi @krunalsshah I tried using ERN_LOG_LEVEL=trace and found the logs:

events.js:288
      throw er; // Unhandled 'error' event
      ^

Error: spawn C:\Users\.ern\versions\0.38.16\node_modules\.bin\yarn ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
    at onErrorNT (internal/child_process.js:469:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
    at onErrorNT (internal/child_process.js:469:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'spawn C:\Users\.ern\versions\0.38.16\node_modules\.bin\yarn',
  path: 'C:\Users\.ern\versions\0.38.16\node_modules\.bin\yarn',
  spawnargs: [ 'info', 'test-miniapp', 'versions', '--json' ]

@dig22
Copy link
Author

dig22 commented Mar 25, 2020

It appears to be an issue with spawn.. Can you also try to use bash for WSL?

@friederbluemle I tried using WSL (ubuntu 18.04) it works but gives another error mentioned below:

Command yarn add react-native@0.60.6 --exact failed.

(However unrelated to this issue i think)

This issue is only with respect to windows : cmd/powershell gets stuck on running the command and git-bash gives a spawn error.

[Windows]
electrode-native : v1.0.17
ern platform : v0.39.0
node : v12.14.1

[WSL Ubuntu 18.04]
electrode-native : v1.0.17
ern platform : v0.40.0
node : v12.16.1

Thank you for assistance and WSL workaround @IndianNative @friederbluemle @krunalsshah

@dig22 dig22 changed the title ern create-miniapp fails ern create-miniapp fails [Windows] Mar 25, 2020
@friederbluemle
Copy link
Member

Thanks for reporting back @dig22 - Is there any additional output for the other error you're seeing?

@dig22
Copy link
Author

dig22 commented Mar 26, 2020

@friederbluemle unfortunately no other log info apart from what @IndianNative found on git bash.

PowerShell gets stuck here :

ps1

@friederbluemle
Copy link
Member

@dig22 - Thanks for the screenshot. I have a Windows machine ready for testing and will check this either tomorrow or on the weekend (quite busy with work at the moment, so apologies for the delay).

@friederbluemle
Copy link
Member

@dig22 @IndianNative - The issue is reproducible and we're looking into it. Will update you on the progress.

@friederbluemle
Copy link
Member

@dig22 @IndianNative - Electrode Native version 0.40.2 was released just a couple of hours ago. It contains a fix related to running Yarn on Windows.

Can you please try again using the latest version:

ern platform use latest

Then, repeat the same command you used above.

ern create-miniapp app

@IndianNative
Copy link

Thanks @friederbluemle will check with latest version and update you soon. I was also occupied with other work so didn't get time to check this thread.

@friederbluemle
Copy link
Member

Hi @IndianNative - Just checking real quick if you've had a chance to test it again with the latest version of ERN?

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

Successfully merging a pull request may close this issue.

4 participants