React Native Application error at installing npx bugsnag - react-native

Error: spawn npm ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
at onErrorNT (internal/child_process.js:464:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Hello,
Anas Ahmed here, I was installing bugsnag-expo-cli-init in my react native app at first it asked me 3 ques and then at the time of installing it gave me this error can anyone help me in this. Installing in npm

Are you attempting to run the bugsnag-expo-cli on Windows? Bugsnag's Expo CLI currently only supports Linux and Mac:
https://docs.bugsnag.com/platforms/react-native/expo/#installation-and-configuration
As an alternative to the CLI, you could follow the manual integration guide:
https://docs.bugsnag.com/platforms/react-native/expo/manual-setup/

Related

Build (React native) Android app and generate .apk file by using turtle cli from azure devops pipeline

I am trying to build Android app by using turtle cli for this i am using below script.
![258988-image.png][1]
npm install -g turtle-cli
turtle cli has installed and build also started but failing at building section, i am getting below error.
I am stuck guys, Could you please guide me where i am doing mistake. Let me know if you need more information.
error:
Nov 9 13:06:46 turtle[19222] ERROR: Failed to build standalone app
err: Error: ./gradlew exited with non-zero code: 1
at ChildProcess.completionListener (/Users/runner/hostedtoolcache/node/14.19.3/x64/lib/node_modules/turtle-cli/node_modules/#expo/xdl/node_modules/#expo/spawn-async/src/spawnAsync.ts:65:13)
at Object.onceWrapper (events.js:520:26)
at ChildProcess.emit (events.js:400:28)
at ChildProcess.emit (domain.js:475:12)
at maybeClose (internal/child_process.js:1088:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:296:5)
...
at spawnAsync (/Users/runner/hostedtoolcache/node/14.19.3/x64/lib/node_modules/turtle-
cli/node_modules/#expo/xdl/node_modules/#expo/spawn-async/src/spawnAsync.ts:26:19)
at spawn Async Throw Error (/#expo/xdl#59.2.1/src/detach/ExponentTools.ts:111:19)
at build Shell App sync (/#expo/xdl#59.2.1/src/detach/AndroidShellApp.js:1494:11)
at Object.create Android Shell AppAsync (/#expo/xdl#59.2.1/src/detach/AndroidShellApp.js:382:5)
at runShellAppBuilder (/Users/runner/hostedtoolcache/node/14.19.3/x64/lib/node_modules/turtle-cli/src/builders/android.ts:99:5)
at buildAndroid (/Users/runner/hostedtoolcache/node/14.19.3/x64/lib/node_modules/turtle-cli/src/builders/android.ts:31:26)
at /Users/runner/hosted tool cache/node/14.19.3/x64/lib/node_modules/turtle-cli/src/bin/utils/builder.ts:87:7
at Command. (/Users/runner/hosted tool cache/node/14.19.3/x64/lib/node_modules/turtle-cli/src/bin/index.ts:23:12)
platform: "android"

expo install react-native-svg "error Running this command will add the dependency to the workspace root rather than the workspace itself..."

I'm using Expo CLI. I want to use SVG in React Native. So, I follow an instruction from here https://github.com/react-native-svg/react-native-svg. But when I installed expo install react-native-svg I received the following error:
expo install react-native-svg
> yarn add react-native-svg
yarn add v1.22.11
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
error Running this command will add the dependency to the workspace root rather than the workspace itself, which might not be what you want - if you really meant it, make it explicit by running this command again with the -W flag (or --ignore-workspace-root-check).
yarnpkg exited with non-zero code: 1
Error: yarnpkg exited with non-zero code: 1
at ChildProcess.completionListener (C:\Users\85620\AppData\Roaming\npm\node_modules\expo-cli\node_modules\#expo\spawn-async\src\spawnAsync.ts:65:13)
at Object.onceWrapper (events.js:482:26)
at ChildProcess.emit (events.js:375:28)
at ChildProcess.cp.emit (C:\Users\85620\AppData\Roaming\npm\node_modules\expo-cli\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (internal/child_process.js:1055:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
...
at Object.spawnAsync [as default] (C:\Users\85620\AppData\Roaming\npm\node_modules\expo-cli\node_modules\#expo\spawn-async\src\spawnAsync.ts:26:19)
at YarnPackageManager._runAsync (C:\Users\85620\AppData\Roaming\npm\node_modules\expo-cli\node_modules\#expo\package-manager\src\NodePackageManagers.ts:309:31)
at YarnPackageManager.addAsync (C:\Users\85620\AppData\Roaming\npm\node_modules\expo-cli\node_modules\#expo\package-manager\src\NodePackageManagers.ts:258:16)
at actionAsync (C:\Users\85620\AppData\Roaming\npm\node_modules\expo-cli\src\commands\installAsync.ts:55:12)
Screenshot1
And when I tried this command yarn add react-native-svg, I received this error
yarn add react-native-svg
error Running this command will add the dependency to the workspace root rather than the workspace itself, which might not be what you want - if you really meant it, make it explicit by running this command again with the -W flag (or --ignore-workspace-root-check).
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Screenshot2
Any suggestion? I'm new to Expo and React Native.
Maybe you should use expo command
expo install react-native-svg
According to this topic why does yarn warn when adding a dependency to the root workspaces package.json, now I can install it with the following command.
yarn workspace mobile-app add react-native-svg

Getting error when installing Bugsnag 'Error: spawn npm ENOENT'

this is the first time I post here so apologies if I don't follow some rules or incorrect formatting.
I'm making an app using React Native and Expo and when I try to install bugsnag I get this error.
$ npx bugsnag-expo-cli init
โˆš #bugsnag/expo does not appear to be installed, do you want to install it? ... yes
โˆš If you want the latest version of #bugsnag/expo hit enter, otherwise type the version you want ... latest
โˆš Using yarn or npm? ยป npm
> Installing #bugsnag/expo with npm. This could take a while!
Error: spawn npm ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
at onErrorNT (internal/child_process.js:465:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Are you attempting to run the bugsnag-expo-cli on Windows? The Expo CLI currently only supports MacOS and Linux:
https://docs.bugsnag.com/platforms/react-native/expo/#installation-and-configuration
As an alternative to the CLI, you can follow the manual integration guide:
https://docs.bugsnag.com/platforms/react-native/expo/manual-setup/

Getting error while executing run-android with react-native

my english isn't that good. I am from Turkey and sorry if my question isn't clear to you.
When I run run-android with React Native, I get the following error but when I run run-ios I don't get any issue. I am using a Mac computer.
Thank you for your help.
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1063 file(s) to forward-jetify. Using 4 workers...
info JS server already running.
info Installing the app...
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: spawn EPERM
at ChildProcess.spawn (internal/child_process.js:407:11)
at Object.spawn (child_process.js:548:9)
at module.exports (/Users/meric/Desktop/Phonder/node_modules/execa/index.js:205:26)
at runOnAllDevices (/Users/meric/Desktop/Phonder/node_modules/#react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:32)
at buildAndRun (/Users/meric/Desktop/Phonder/node_modules/#react-native-community/cli-platform-android/build/commands/runAndroid/index.js:182:41)
at /Users/meric/Desktop/Phonder/node_modules/#react-native-community/cli-platform-android/build/commands/runAndroid/index.js:146:12
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Command.handleAction (/Users/meric/Desktop/Phonder/node_modules/react-native/node_modules/#react-native-community/cli/build/index.js:186:9)
enter image description here
I think you should uninstall the app on any emulator or devices, after that please re-run app.
It might be caused by having package.lock.json and yarn.lock at the same time

Running `expo start` fails with ENOENT error just after installing expo-cli on windows 10

I'm on Windows 10 Version 10.0.16299 Build 16299. I'm using Powershell. I just used yarn global add expo-cli to install expo, then I ran expo init my-app then cd my-app and expo start, but the build is failing. Here's the error image and text:
[23:11:49] Starting project at C:\projects\my-app
[23:11:58] Starting Metro Bundler on port 19001.
[23:11:58] Metro Bundler ready.
[23:12:00] Expo DevTools is running at http://localhost:19002
[23:12:00] Opening DevTools in the browser... (press shift-d to disable)
Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:229:19)
at onErrorNT (internal/child_process.js:406:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
Any ideas? Or even suggestions on another place where I can post this issue since it's failing out of the box. All help appreciated.
For windows:-
add environment variable in
set Path - C:\Windows\System32\
after setting path. restart your computer.
In my case, I added C:\Windows\System32\
See the Picture below: