While resolving module `react-native/Libraries/NewAppScreen`, the Haste package `react-native` was found - react-native

running expo start raises the following error:
While resolving module react-native/Libraries/NewAppScreen, the Haste package react-native was found. However the module Libraries/NewAppScreen could
not be found within the package. Indeed, none of these files exist:
* C:\...\node_modules\react-native\Libraries\NewAppScreen(.native||.ios.expo.ts|.native.expo.ts|.expo.ts|.ios.expo.tsx|.native.expo.tsx|.expo.tsx|.ios.expo.js|.native.expo.js|.expo.js|.ios.expo.jsx|.native.expo.jsx|.expo.jsx|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.wasm|.native.wasm|.wasm)
* C:\...\node_modules\react-native\Libraries\NewAppScreen\index(.native||.ios.expo.ts|.native.expo.ts|.expo.ts|.ios.expo.tsx|.native.expo.tsx|.expo.tsx|.ios.expo.js|.native.expo.js|.expo.js|.ios.expo.jsx|.native.expo.jsx|.expo.jsx|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.wasm|.native.wasm|.wasm)
Failed building JavaScript bundle.
expo-cli error
Expo CLI 3.11.1 environment info:
System:
OS: Windows 10
Binaries:
Yarn: 1.13.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.13.0 - C:\Program Files\nodejs\npm.CMD

Problem solved. I forgot to update the "sdkVersion" to "36.0.0" in app.json after I upgraded my app.

Try to install Expo CLI before run your project.
npm install -g expo-cli

Related

problem with expo react native navigation

i am using react-native with expo to run my app on my android devices when i load my app on my terminal i have this error
Some dependencies are incompatible with the installed expo package version:
#react-native-community/masked-view - expected version: 0.1.10 - actual version installed: 0.1.11
Your project may not work correctly until you install the correct versions of the packages.
To install the correct versions of these packages, please run: expo install [package-name ...]
Missing package "metro-config" in the project at: C:\Users\kabore\Desktop\react_native\app1
This usually means react-native is not installed. Please verify that dependencies in package.json include "react-native" and run yarn or npm install.
Error: Missing package "metro-config" in the project at: C:\Users\kabore\Desktop\react_nativ
simply remove the node_modules folder and run yarn install or npm install in the command line to install dependencies again .it seems like some of your dependencies are not installed correctly

Properly set-up react-native on Mac with M1 (can't find the right answer)

I have a MacBook Pro M1 and I am trying to start a React Native project with PyCharm/WebStorm but running in the following issue:
info Installing required CocoaPods dependencies
✔ CocoaPods (https://cocoapods.org/) is not installed. CocoaPods is necessary for the iOS project to run correctly. Do you want to install it? › Yes, with gem (may require sudo)
error
/Users/nicolamacchitella/PycharmProjects/reactproject/node_modules/metro-hermes-compiler/src/emhermesc.js:77
throw ex;
^
RuntimeError: abort(Error: An error occured while trying to install CocoaPods, which is required by this template.
Please try again manually: sudo gem install cocoapods.
CocoaPods documentation: https://cocoapods.org/). Build with -s ASSERTIONS=1 for more info.
at process.abort (/Users/nicolamacchitella/PycharmProjects/reactproject/node_modules/metro-hermes-compiler/src/emhermesc.js:440:13)
at process.emit (node:events:390:28)
at emit (node:internal/process/promises:136:22)
at processPromiseRejections (node:internal/process/promises:242:25)
at processTicksAndRejections (node:internal/process/task_queues:97:32)
Node.js v17.0.1
Done
I also running some issues at first while to setup the development environment on my M1 Macbook Pro.
Try to run:
sudo gem install cocoapods
If it doesn't work, install Homebrew, and run:
brew install cocoapods

Failed to install expo package with error: yarnpkg exited with non-zero code: 1 yarnpkg exited with non-zero code: 1

Im currently trying to update my Expo SDK from 36.0.0 to atleast 37.0.0 with the command expo update
however im getting the error:
× 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\Philipp\AppData\Roaming\npm\node_modules\expo-cli\node_modules\#expo\spawn-async\src\spawnAsync.ts:65:13)
at Object.onceWrapper (events.js:422:26)
at ChildProcess.emit (events.js:315:20)
at ChildProcess.cp.emit (C:\Users\Philipp\AppData\Roaming\npm\node_modules\expo-cli\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
...
at Object.spawnAsync [as default] (C:\Users\Philipp\AppData\Roaming\npm\node_modules\expo-cli\node_modules\#expo\spawn-async\src\spawnAsync.ts:26:19)
at YarnPackageManager._runAsync (C:\Users\Philipp\AppData\Roaming\npm\node_modules\expo-cli\node_modules\#expo\package-manager\src\NodePackageManagers.ts:288:31)
at YarnPackageManager.addAsync (C:\Users\Philipp\AppData\Roaming\npm\node_modules\expo-cli\node_modules\#expo\package-manager\src\NodePackageManagers.ts:241:16)
at upgradeAsync (C:\Users\Philipp\AppData\Roaming\npm\node_modules\expo-cli\src\commands\upgrade.ts:465:5)
at C:\Users\Philipp\AppData\Roaming\npm\node_modules\expo-cli\src\commands\upgrade.ts:701:7
at Command.<anonymous> (C:\Users\Philipp\AppData\Roaming\npm\node_modules\expo-cli\src\exp.ts:302:7)
npm version : 6.14.8
yarn version : 2.2.2 i also tried it with a lower version 1.x.x
expo diagnostics :
Expo CLI 3.27.4 environment info:
System:
OS: Windows 10 10.0.19041
Binaries:
Node: 12.18.3 - C:\Program Files\nodejs\node.EXE
Yarn: 2.2.2 - C:\Users\Philipp\AppData\Roaming\npm\yarn.CMD
npm: 6.14.8 - C:\Program Files\nodejs\npm.CMD
npmPackages:
expo: ^36.0.0 => 36.0.2
react: 16.9.0 => 16.9.0
react-dom: 16.9.0 => 16.9.0
react-native: https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz => 0.61.4
react-native-web: ^0.11.7 => 0.11.7
react-navigation: 3.11.1 => 3.11.1
Expo Workflow: managed
Hopefully someone can help me, any help is appreciated. Thank you very much!
This is one way how I solved this issue.
I deleted the yarn.lock file & .expo folder and tried running expo upgrade and it worked.
I was upgrading from SDK 44 to SDK 45.
remove this line from package.json
"react-native": "https://github.com/expo/react-native/archive/sdk-39.0.3.tar.gz"
now remove node_modules
now:
yarn install
now add that line back in package.json
again
yarn install
now if it succeeds, do a
expo upgrade
I solved after 2 days
I ran yarn install (npm install should do the same thing.) in my project folder first. Then expo upgrade command worked.
By any chance is this a monorepo? I ran into this error because I accidentally upgrade expo in the root folder
I ran yarn install (npm install should do the same thing.) in my project folder first. Then expo upgrade command worked.
just install expo-notifications using normal package installation as below
instead of expo install expo-notifications use
npm i expo-notifications
I was running expo upgrade from root directory of my app and experienced the same error
I changed to the directory of my mobile app and it ran successfully without any errors
Only thing I did is to delete the yarn.lock
then run the upgrade command, the non-zero error goes away
This is one way how I solved this issue.
I deleted the yarn.lock file & .expo folder and tried running expo upgrade and it worked.
I was upgrading from SDK 44 to SDK 45.
I deleted the yarn.lock file and tried running expo upgrade and it worked.

recently i updated my expo-cli to version 3.13.1 and all of a sudden the applications are not working

after updating expo-cli to 3.13.1 , when i start the application i get errors .
on npm start
- Some of your project's dependencies are not compatible with currently installed expo package version: - react-native-safe-area-context - expected version range: 0.6.0 - actual version installed: ^0.7.3 Your project may not work correctly until you install the correct versions of the packages.
To install the correct versions of these packages, please run: expo install [package-name ...]
if i install react-native-safe-area-context#0.6.0 , it gives the following error
Unable to resolve "./InitialWindowSafeAreaInsets" from "node_modules\react-native-safe-area-context\src\index.tsx
before updating it was working fine .
Seems like you're installing it with npm. You should install it with Expo:
expo install react-native-safe-area-context

"appium &" won't start appium server in mac

I have downloaded all the required tools and able to set up environment variable.
macOS mojave : version 10.14.3
I have install node, appium and wd:
brew install node
npm install -g appium
npm install wd
when i try yo start appium server using appium & I got following error;
[1] 49460
-bash: appium: command not found
[1]+ Exit 127 appium
Updated:
None of app opens which is installed using npm command. The app installed using npm shows command not found error
It was working fine in macOs Mojave 10.14.2
Logs while using npm install -g appium
$npm install -g appium
npm WARN deprecated fsevents#2.0.1: Not Ready For Production
/Users/infotmt/bin/appium -> /Users/infotmt/lib/node_modules/appium/build/lib/main.js
> appium-chromedriver#4.9.0 install /Users/infotmt/lib/node_modules/appium/node_modules/appium-chromedriver
> node install-npm.js
[18:22:48] [Chromedriver Install] Installing Chromedriver version '2.44' for platform 'mac' and architecture '64'
[18:22:48] [Chromedriver Install] Opening temp file to write 'chromedriver_mac64' to...
[18:22:48] [Chromedriver Install] Opened temp file '/var/folders/ng/_2f_j78n1vg4gf8xnxvx9c780000gn/T/2019025-62054-1018qcf.8dtn/chromedriver_mac64.zip'
[18:22:48] [Chromedriver Install] Downloading https://chromedriver.storage.googleapis.com/2.44/chromedriver_mac64.zip...
[18:22:52] [Chromedriver Install] Writing binary content to /var/folders/ng/_2f_j78n1vg4gf8xnxvx9c780000gn/T/2019025-62054-1018qcf.8dtn/chromedriver_mac64.zip...
[18:22:52] [Chromedriver Install] Extracting /var/folders/ng/_2f_j78n1vg4gf8xnxvx9c780000gn/T/2019025-62054-1018qcf.8dtn/chromedriver_mac64.zip to /var/folders/ng/_2f_j78n1vg4gf8xnxvx9c780000gn/T/2019025-62054-1018qcf.8dtn/chromedriver_mac64
[18:22:52] [Chromedriver Install] Creating /Users/infotmt/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac...
[18:22:52] [Chromedriver Install] Copying unzipped binary, reading from /var/folders/ng/_2f_j78n1vg4gf8xnxvx9c780000gn/T/2019025-62054-1018qcf.8dtn/chromedriver_mac64/chromedriver...
[18:22:52] [Chromedriver Install] Writing to /Users/infotmt/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver...
[18:22:52] [Chromedriver Install] /Users/infotmt/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver successfully put in place
> appium-selendroid-driver#1.13.2 install /Users/infotmt/lib/node_modules/appium/node_modules/appium-selendroid-driver
> node ./bin/install.js
[18:22:54] Java version 1.8.0_202 found
[18:22:55] Ensuring /Users/infotmt/lib/node_modules/appium/node_modules/appium-selendroid-driver/selendroid/download exists
[18:22:55] Downloading Selendroid standalone server version 0.17.0 from https://repo1.maven.org/maven2/io/selendroid/selendroid-standalone/0.17.0/selendroid-standalone-0.17.0-with-dependencies.jar --> /Users/infotmt/lib/node_modules/appium/node_modules/appium-selendroid-driver/selendroid/download/selendroid-server-7cf7163ac47f1c46eff95b62f78b58c1dabdec534acc6632da3784739f6e9d82.jar
[18:23:07] Writing binary content to /Users/infotmt/lib/node_modules/appium/node_modules/appium-selendroid-driver/selendroid/download/selendroid-server.jar.tmp
[18:23:07] Selendroid standalone server downloaded
[18:23:07] Determining AndroidManifest location
[18:23:07] Determining server apk location
[18:23:07] Extracting manifest and apk to /Users/infotmt/lib/node_modules/appium/node_modules/appium-selendroid-driver/selendroid/download
[18:23:07] Copying manifest and apk to /Users/infotmt/lib/node_modules/appium/node_modules/appium-selendroid-driver/selendroid
[18:23:07] Cleaning up temp files
[18:23:07] Fixing AndroidManifest icon bug
> appium-windows-driver#1.5.1 install /Users/infotmt/lib/node_modules/appium/node_modules/appium-windows-driver
> node install-npm.js
Not installing WinAppDriver since did not detect a Windows system
> fsevents#2.0.1 install /Users/infotmt/lib/node_modules/appium/node_modules/fsevents
> [ -f fsevents.node ] || npm run prepare
> heapdump#0.3.12 install /Users/infotmt/lib/node_modules/appium/node_modules/heapdump
> node-gyp rebuild
CXX(target) Release/obj.target/addon/src/heapdump.o
In file included from ../src/heapdump.cc:17:
../../nan/nan.h:1064:44: warning: 'ToString' is deprecated: Use maybe version
[-Wdeprecated-declarations]
v8::Local<v8::String> string = from->ToString(v8::Isolate::GetCurrent());
^
/Users/infotmt/.node-gyp/11.7.0/include/node/v8.h:2537:3: note: 'ToString' has
been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version",
^
/Users/infotmt/.node-gyp/11.7.0/include/node/v8config.h:326:29: note: expanded
from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
1 warning generated.
SOLINK_MODULE(target) Release/addon.node
+ appium#1.10.1
added 493 packages from 406 contributors and updated 2 packages in 34.024s
My advice is as follows:
1. Do not use Homebrew to install Node.js.
The best way to do this is to use the nvm version manager. I had many conflicts with Node.js on MacOS, but nvm is a bulletproof solution.
https://yoember.com/nodejs/the-best-way-to-install-node-js/
2. It is also highly recommended to use version managers for
Ruby https://github.com/rbenv/rbenv
Python https://github.com/pyenv/pyenv
Java http://www.jenv.be/
Version managers take over Node/Ruby/Python/Java management from the system and allow you to install parallel versions and keep consistency of modules/packages/gems etc.
3. Then install the following packages:
npm install -g appium
npm install -g appium-doctor
After that you can check the list of all Appium dependencies:
appium-doctor --ios
appium-doctor --android
Follow the instructions and complete the list.
4. Never install modules/packages/gems... with sudo.
The problem is that i installed the node/npm in very old version of mac. Then i upgraded the mac version to mojave.
I solve the issue by factory resetting the mac and then updating it to latest version. After that i install node/npm and then appium. It works fine now.
Are you able to start appium server using desktop client?
https://github.com/appium/appium-desktop/releases/tag/v1.10.0
Also did you refer this https://github.com/appium/appium/issues/6738?
Check your $PATH environment variable for existence of /Users/infotmt/bin.
Try installing the desktop version from releases: https://github.com/appium/appium-desktop
Did you try to install appium-doctor?
Try running npm install -g appium-doctor as kubano tolds you. I'm currently using it in mojave, so feel free to ask me anything
try installing appium using brew brew install appium it will install the appium server on local under user
Thanks!