Expo version 44 to 47 expo upgrade error: Failed to install expo package with error: yarnpkg exited with non-zero code: 1 - react-native

I just cloned the repository;
"https://github.com/GeekyAnts/nativebase-templates/tree/master/solito-universal-app-template-nativebase"
and did:
yarn run start;
Then in my mi note 10 expo go app:
This project uses SDK 44.0.0, but this version of Expo Go only supports the following SDK's:
47.0.0, 46.0.0, 45.0.0
To load the project it must be updated to a supported SDK version or an older version of
Expo Go must be used.
and after I tried to upgrade expo
expo upgrade
the error shown:
Warning! Your git working tree is dirty.
It's recommended to commit all your changes before proceeding, so you can revert the changes made by this command if necessary.
√ Would you like to proceed? ... yes
√ You are currently using SDK 44.0.0. Would you like to update to the latest version, 47.0.0? ... yes
× Failed to install expo package with error: yarnpkg exited with non-zero code: 1
yarnpkg exited with non-zero code: 1
Error: yarnpkg exited with non-zero code: 1
at ChildProcess.completionListener (C:\Users\justi\AppData\Roaming\npm\node_modules\expo-cli\node_modules\#expo\spawn-async\src\spawnAsync.ts:65:13)
at Object.onceWrapper (node:events:628:26)
at ChildProcess.emit (node:events:513:28)
at ChildProcess.cp.emit (C:\Users\justi\AppData\Roaming\npm\node_modules\expo-cli\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (node:internal/child_process:1091:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
...
at spawnAsync (C:\Users\justi\AppData\Roaming\npm\node_modules\expo-cli\node_modules\#expo\spawn-async\src\spawnAsync.ts:26:19)
at YarnPackageManager._runAsync (C:\Users\justi\AppData\Roaming\npm\node_modules\expo-cli\node_modules\#expo\package-manager\src\NodePackageManagers.ts:314:31)
at YarnPackageManager.addWithParametersAsync (C:\Users\justi\AppData\Roaming\npm\node_modules\expo-cli\node_modules\#expo\package-manager\src\NodePackageManagers.ts:259:16)
at YarnPackageManager.addAsync (C:\Users\justi\AppData\Roaming\npm\node_modules\expo-cli\node_modules\#expo\package-manager\src\NodePackageManagers.ts:263:5)
at upgradeAsync (C:\Users\justi\AppData\Roaming\npm\node_modules\expo-cli\src\commands\info\upgradeAsync.ts:496:7)
at actionAsync (C:\Users\justi\AppData\Roaming\npm\node_modules\expo-cli\src\commands\info\upgradeAsync.ts:42:3)
I also followed deleted the node_modules .expo folders in each of the folders: Expo and Next folders, also I tried to upgrade expo 44 version to 47
according those links:
Incompatible react native SDK with expo SDK
https://github.com/expo/expo/issues/21026
https://github.com/expo/expo/issues/16293
Also I tried to:
npx expo start
WARNING: The legacy expo-cli does not support Node +17. Migrate to the versioned Expo CLI (npx expo).
› Port 19000 is
√ Use port 19001 instead? ... yes
Starting project at D:\Belgeler\VScode\NativeBaseSolito\nativebase-templates\solito-universal-app-template-nativebase
Starting Metro Bundler
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█ ▄▄▄▄▄ █▀▀ ██▄█ █ ▄▄▄▄▄ █
█ █ █ █▄▀██▀██ ▀█ █ █ █
█ █▄▄▄█ █ ▄ █ █▀ ██ █▄▄▄█ █
█▄▄▄▄▄▄▄█ █ ▀▄█▄█▄█▄▄▄▄▄▄▄█
█▄ ▀ ▀█▄▄▀▀█ ▀▄▄▀ ▄▀▄▄▀█
█▀▄▄▀ ▄ ▀▀ ▄▀▄▄▀ ▀▀█▄▄█
█▄▀███▄▄▄▄█▄ █ █▀█ ▄█ ██▀█
█▄▀▀▀▀▀▄█ █▄ █▀▀█ ▄▄ ▀▀██▄█
█▄▄██▄▄▄█ ▀██ ▀▄ ▄▄▄ █ ▄ █
█ ▄▄▄▄▄ █▄ ▄ █▄ █▄█ ▀ ▄█
█ █ █ █▀ ▄▀▄ ▀▀▄ ▄▄ █▀▄██
█ █▄▄▄█ █▀ ▀██ █ █▄ ▄█▄█
█▄▄▄▄▄▄▄█▄▄███▄▄█▄███▄▄█▄▄█
› Metro waiting on exp://192.168.1.68:19001
› Scan the QR code above with Expo Go (Android) or the Camera app (iOS)
› Press a │ open Android
› Press w │ open web
› Press r │ reload app
› Press m │ toggle menu
› Press ? │ show all commands
Logs for your project will appear below. Press Ctrl+C to exit.
Error: Can't find react-native in package.json dependencies
Failed to construct transformer: Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:133:10)
at stableHash (D:\Belgeler\VScode\NativeBaseSolito\nativebase-templates\solito-universal-app-template-nativebase\node_modules\metro-cache\src\stableHash.js:19:8)
at Object.getCacheKey (D:\Belgeler\VScode\NativeBaseSolito\nativebase-templates\solito-universal-app-template-nativebase\node_modules\metro-transform-worker\src\index.js:647:7)
at getTransformCacheKey (D:\Belgeler\VScode\NativeBaseSolito\nativebase-templates\solito-universal-app-template-nativebase\node_modules\metro\src\DeltaBundler\getTransformCacheKey.js:32:19)
at new Transformer (D:\Belgeler\VScode\NativeBaseSolito\nativebase-templates\solito-universal-app-template-nativebase\node_modules\metro\src\DeltaBundler\Transformer.js:180:28)
at D:\Belgeler\VScode\NativeBaseSolito\nativebase-templates\solito-universal-app-template-nativebase\node_modules\metro\src\Bundler.js:58:29 {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
and after I used QR code to enter the app and the error same ExpoGo APK
SDK 44 to SDK 47 is shown.
Now I will be trying to downgrade my expo go version of my phone apk if its possible. Any help will be appreciated.
I was expecting after; git clone and yarn install the project.
Everything should be good to go for a new project using this template.
Versions:
expo version 6.3.1
yarn version 1.22.19
npm version 8.19.2
node version 18.12.1
Android APK:
expo go latest: 2.26.6

Related

I got a problem installing bundler when trying create my new react native project am using Mac OS high sierra

and this was my terminal output
✔ Downloading template
✔ Copying template
✔ Processing template
✖ Installing Bundler
error
✖ Installing Bundler
error Error: Looks like your iOS environment is not properly set. Please go to https://reactnative.dev/docs/next/environment-setup and follow the React Native CLI QuickStart guide for macOS and iOS.
Error: Error: Looks like your iOS environment is not properly set. Please go to https://reactnative.dev/docs/next/environment-setup and follow the React Native CLI QuickStart guide for macOS and iOS.
at createFromTemplate (/Users/techero/.npm/_npx/1164/lib/node_modules/react-native/node_modules/#react-native-community/cli/build/commands/init/init.js:169:11)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Object.initialize [as func] (/Users/techero/.npm/_npx/1164/lib/node_modules/react-native/node_modules/#react-native-community/cli/build/commands/init/init.js:222:3)
at async Command.handleAction (/Users/techero/.npm/_npx/1164/lib/node_modules/react-native/node_modules/#react-native-community/cli/build/index.js:140:9).
please help me fixing this bug ..I have walking around trying different option but no result
I run npx react-native init myapp and also I have run react native doctor and this was the result..please I need help fixing this bug....
Techeros-MacBook-Pro:myapp techero$ npx react-native doctor
Common
✓ Node.js
✓ npm
● Watchman - Used for watching changes in the filesystem when in development mode
Android
✓ JDK
✓ Android Studio - Required for building and installing your app on Android
✓ Android SDK - Required for building and installing your app on Android
✓ ANDROID_HOME
iOS
✖ Xcode - Required for building and installing your app on iOS
- Version found: N/A
- Version supported: >= 12.x
✓ CocoaPods - Required for installing iOS dependencies
● ios-deploy - Required for installing your app on a physical device with the CLI
✓ .xcode.env - File to customize Xcode environment
Errors: 1
Warnings: 2
Usage
› Press f to try to fix issues.
› Press e to try to fix errors.
› Press w to try to fix warnings.
› Press Enter to exit.
type here
From your error:
✖ Xcode - Required for building and installing your app on iOS
- Version found: N/A
- Version supported: >= 12.x
You need to install Xcode 12 or higher and build-tools for this version.

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/

Can't run react-native run-android?

I'v followed the steps from https://reactnative.dev/docs/environment-setup. I can start the phone emulator from AVD Manager in Android Studio and I can run react-native start without problems. When i enter in another terminal react-native run-android I get the following error:
info Running jetifier to migrate libraries to AndroidX. You can
disable it using "--no-jetifier" flag. (node:9612) Warning: Accessing
non-existent property 'padLevels' of module exports inside circular
dependency (Use node --trace-warnings ... to show where the warning
was created) Jetifier found 967 file(s) to forward-jetify. Using 16
workers... info Starting JS server... info Launching emulator... info
Successfully launched emulator. info Installing the app... Downloading
file:/D:/App/AwesomeProject/android/gradle/wrapper/services.gradle.org/distributions/gradle-6.7-all.zip
Exception in thread "main" java.io.FileNotFoundException:
D:\App\AwesomeProject\android\gradle\wrapper\services.gradle.org\distributions\gradle-6.7-all.zip
(The system cannot find the path specified)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:211)
at java.base/java.io.FileInputStream.(FileInputStream.java:153)
at java.base/java.io.FileInputStream.(FileInputStream.java:108)
at java.base/sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:86)
at java.base/sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:189)
at org.gradle.wrapper.Download.downloadInternal(Download.java:78)
at org.gradle.wrapper.Download.download(Download.java:63)
at org.gradle.wrapper.Install$1.call(Install.java:68)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)
error Failed to install the app. Make sure you have the Android
development environment set up:
https://reactnative.dev/docs/environment-setup. Run CLI with --verbose
flag for more details. Error: Command failed: gradlew.bat
app:installDebug -PreactNativeDevServerPort=8081 Exception in thread
"main" java.io.FileNotFoundException:
D:\App\AwesomeProject\android\gradle\wrapper\services.gradle.org\distributions\gradle-6.7-all.zip
(The system cannot find the path specified)
And if I run react-native info I get:
info Fetching system and libraries information... (node:14952)
Warning: Accessing non-existent property 'padLevels' of module exports
inside circular dependency (Use node --trace-warnings ... to show
where the warning was created) System:
OS: Windows 10 10.0.19041
CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor
Memory: 23.88 GB / 31.90 GB Binaries:
Node: 14.15.0 - D:\nodejs\node.EXE
Yarn: Not Found
npm: 6.14.8 - D:\nodejs\npm.CMD
Watchman: Not Found SDKs:
Android SDK: Not Found
Windows SDK: Not Found IDEs:
Android Studio: Not Found
Visual Studio: Not Found Languages:
Java: 15.0.1
Python: 3.9.0 npmPackages:
#react-native-community/cli: ^4.13.0 => 4.13.0
react: 16.13.1 => 16.13.1
react-native: 0.63.3 => 0.63.3
react-native-windows: Not Found npmGlobalPackages:
react-native: Not Found
I'v tried a lot of things but nothing seems to work.
Looks like an issue with gradle version.
Do these.
remove android/.gradle folder.
open /android in android studio
goto File->Project Structure->Project and change Gradle Version to more recent one. and wait for it to complete gralde sync task.
run react-native run-android after this.

React Native yarn run ios/android or npm run ios/android not working (Could not get status from Metro bundler)

I've been coding a React Native application by running the app on my android device by doing: yarn start
My app has been ejected from expo but I'm still using expo for development and on a android device and with yarn start it works ok....my problem now is running it on a simulator on my MacBook Pro...
I currently do not have my own ios device and therefore would need to run via the simulator on my MacBook Pro. I try to run the react native app via the simulator via: yarn run ios
However when I run that the simulator does not start and I get the following error:
yarn run v1.3.2
$ expo start --ios
┌─────────────────────────────────────────────────────────────────────────┐
│ │
│ There is a new version of expo-cli available (3.18.4). │
│ You are currently using expo-cli 3.17.10 │
│ Install expo-cli globally using the package manager of your choice; │
│ for example: `npm install -g expo-cli` to get the latest version │
│ │
└─────────────────────────────────────────────────────────────────────────┘
Starting project at /Users/bliss/Documents/Coder/ReactNative/EjectedExpo/JyotishEject
Expo DevTools is running at http://localhost:19002
Could not get status from Metro bundler. connect ECONNREFUSED 127.0.0.1:19001
Connecting to Metro bundler failed.
Set EXPO_DEBUG=true in your env to view the stack trace.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I then tried the android version by running: yarn run android and I get the same error....
how to fix this?
I would like to start working on the ios version asap thru the simulator....
I have now tried running: expo start -c --ios
and I get the following error:
Error running `xcrun simctl openurl booted myapp://127.0.0.1:19000`: An error was encountered processing the command (domain=NSOSStatusErrorDomain, code=-10814):
The operation couldn’t be completed. (OSStatus error -10814.)
Error running app. Have you installed the app already using Xcode? Since you are detached you must build manually. Error: xcrun exited with non-zero code: 194
Your native app is running at myapp://192.168.100.189:19000

ionic 2 sample conference app can't find babelify module

I am learning ionic2. I thought the sample app was a good starting point but unfortunately, I can't get it work. It complained about missing module.Please see the output:
lola#ubuntu:~/pj/ionic-conference-app$ ionic serve
Running 'serve:before' gulp task before serve
[08:53:57] Starting 'sass'...
[08:53:57] Starting 'html'...
[08:53:57] Starting 'fonts'...
[08:53:57] Starting 'scripts'...
[08:53:57] Finished 'scripts' after 63 ms
[08:53:57] Finished 'html' after 115 ms
[08:53:57] Finished 'fonts' after 114 ms
[08:53:58] Finished 'sass' after 888 ms
[08:53:58] Starting 'watch'...
✗ Caught exception:
Error: Cannot find module 'babelify' from '/home/lola/pj/ionic-conference-app'
at /home/lola/pj/ionic-conference-app/node_modules/ionic-gulp-browserify-es2015/node_modules/browserify/node_modules/resolve/lib/async.js:46:17
at process (/home/lola/pj/ionic-conference-app/node_modules/ionic-gulp-browserify-es2015/node_modules/browserify/node_modules/resolve/lib/async.js:173:43)
at ondir (/home/lola/pj/ionic-conference-app/node_modules/ionic-gulp-browserify-es2015/node_modules/browserify/node_modules/resolve/lib/async.js:188:17)
at load (/home/lola/pj/ionic-conference-app/node_modules/ionic-gulp-browserify-es2015/node_modules/browserify/node_modules/resolve/lib/async.js:69:43)
at onex (/home/lola/pj/ionic-conference-app/node_modules/ionic-gulp-browserify-es2015/node_modules/browserify/node_modules/resolve/lib/async.js:92:31)
at /home/lola/pj/ionic-conference-app/node_modules/ionic-gulp-browserify-es2015/node_modules/browserify/node_modules/resolve/lib/async.js:22:47
at FSReqWrap.oncomplete (fs.js:82:15)
Mind letting us know? https://github.com/driftyco/ionic-cli/issues
$ionic info
Your system information:
Cordova CLI: 6.1.1
Ionic Version: 2.0.0-beta.3
Ionic CLI Version: 2.0.0-beta.22
Ionic App Lib Version: 2.0.0-beta.12
OS:
Node Version: v4.4.2
Can anyone help me?
More than likely, you need to update NPM which will include the babelify dependencies. Check your version of NPM by running npm -v , it should be v3.x. Run sudo npm install -g npm to update npm. and you should be good to go.
Just npm install in project root worked for me.