Expo: Unable to resolve module index.ts. None of these files exist - react-native

I'm trying out this template located here (https://github.com/t3-oss/create-t3-turbo).
After installing the dependencies, I ran "pnpm dev" in the terminal. Expo gives this error
Error: Unable to resolve module ./index.ts from C:\Users\...\apps\expo/.:
None of these files exist:
* index.ts(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs)
* index.ts\index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs)
at ModuleResolver.resolveDependency (C:\Users\...\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:153:15)
at DependencyGraph.resolveDependency (C:\Users\...\node_modules\metro\src\node-haste\DependencyGraph.js:276:43)
at C:\Users\...\node_modules\metro\src\lib\transformHelpers.js:171:21
at Server._resolveRelativePath (C:\Users\...\node_modules\metro\src\Server.js:1256:12)
at async Server.requestProcessor [as _processBundleRequest] (C:\Users\...\node_modules\metro\src\Server.js:529:37)
at async Server._processRequest (C:\Users\...\node_modules\metro\src\Server.js:449:9)
index.ts definitely exists in the expo folder. Why is there an error being thrown?
It looks like "main" in the expo folder's package.json is what's throwing this error. I tried changing it to different values, but nothing helped.
Is anyone at least able to confirm they've reproduced the issue? It may be a bug with the template

In case anyone else has this issue, the solution seems to be changing the versions of react and any other libraries that the console suggests.
I was getting a warning for 4 packages that said expo may not work as expected unless these version discrepancies are resolved.
I ignored that because it was my first time with a monorepo, and I thought the versions the template came with would work for everyone. From discussions with others, it seems like it works fine on ios, but not android

Related

react-native-config not working (Empty Config in both OS)

I'm really struggling with what seems like a very primitive error. I have installed react-native-config and when console.logging the Config object it returns {}.
The problem occurs both on android and iOS and it doesn't seem to be a linking issue because (even though RN 71.3 doesn't require manual linking) when following the steps to link manually on android I got an error saying RNCConfigPackage already linked.
This is a simplified version of my code:
import Config from 'react-native-config';
console.log(Config);
And this is what my .env file looks like:
REACT_APP_STAGE=development
TEST=ThisIsATest
ANOTHER_TEST=ThisIsAnotherTest
Debugging attempts
I have already tried:
Running gradlew clean and pod install (even though it's not a platform specific issue)
Run with ENVFILE=.env react-native run-android to hard code the env file
I understand that this is very limited information in order to debug the issue but any direction and help is appreciated including any approach you would follow to debug.
EDIT: The Config appeared in the end but is very late to update, an issue more people seem to be facing, I have used react-native-dotenv instead.

Error: h.playTouchSound is not a function?

I have a project using react-native. Sometimes when I run this project, it says:TypeError: h.playTouchSound is not a function. (In 'h.playTouchSound()', 'h.playTouchSound' is undefined
I found this function in android\app\src\main\assets\index.android.bundle.
To fix this error, I tried to use gradlew clean and rebuild apk. How to handle this error? Is this error will sometimes showing up after production?
In my case upgrading gradle helped right away!
From:
classpath("com.android.tools.build:gradle:4.0.1")
To:
classpath("com.android.tools.build:gradle:4.1.0")
In buid.gradle android project file
This also forced to change distributionUrl in /android/gradle/wrapper/gradle-wrapper.properties file from:
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
To at least:
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
This problem occurred to me when I updated react native from 0.61.4 to 0.64.1
Hope it helps :)

Expo SplashScreen Standalone Build Failed

I am trying to build my application at Expo but I have the following problem:
Error Expo
When looking at the build error log, I have the following message:
Using manifest: {"ios":{"supportsTablet":true,"userInterfaceStyle":"light"},"web":{"favicon":"./assets/favicon.png"},"icon":"./assets/icon.png","name":"Porta do Sol","slug":"portaDoSol","splash":{"image":"./assets/splash.png","imageUrl":"https://d1wp6m56sqw74a.cloudfront.net/~assets/761e4c800ce1de9fd90da12f45687087","resizeMode":"contain","backgroundColor":"#ffffff"},"android":{"package":"com.interface.portadosol","userInterfaceStyle":"light"},"iconUrl":"https://d1wp6m56sqw74a.cloudfront.net/~assets/5aab62d1ae6a0f65e10f12c0e55d20dd","locales":{},"updates":{"fallbackToCacheTimeout":0},"version":"0.0.1","platforms":["ios","android","web"],"entryPoint":"./index.js","sdkVersion":"38.0.0","orientation":"portrait","dependencies":["#react-native-community/masked-view","#react-navigation/drawer","#react-navigation/native","#react-navigation/stack","expo","expo-splash-screen","expo-sqlite","expo-status-bar","expo-updates","native-base","react","react-dom","react-native","react-native-appearance","react-native-gesture-handler","react-native-reanimated","react-native-safe-area-context","react-native-screens","react-native-svg","react-native-svg-charts","react-native-web","sqlite"],"bundledAssets":["asset_3a2ba31570920eeb9b1d217cabe58315.ttf","asset_8b12b3e16d591abc926165fa8f760e3b.json","asset_744ce60078c17d86006dd0edabcd59a7.ttf","asset_461d9bba8b6a3c91675039df12cfe6ca.json","asset_140c53a7643ea949007aa9a282153849.ttf","asset_94c4ffdcbffeb0570c635d7f8edd8a25.json","asset_ca9ce9ff0676a9b04ef0f8a3ad17dd08.ttf","asset_54a5c98d22f313098b3dbe2d5b2e87ba.json","asset_b49ae8ab2dbccb02c4d11caaacf09eab.ttf","asset_39843e5d52a6c5c42d5abdb0b34bcaa6.json","asset_b06871f281fee6b241d60582ae9369b9.ttf","asset_f1f91feb805137c9283fb766620ec5eb.json","asset_09dd345dbd4ec5a0874841d5749ac153.json","asset_0886a6b127c6057cee83f9c65c7ffd62.json","asset_f6c6f6c8cb7784254ad00056f6fbd74e.ttf","asset_b70cea0339374107969eb53e5b1f603f.ttf","asset_c39278f7abfc798a241551194f55e29f.ttf","asset_e20945d7c929279ef7a6f1db184a4470.ttf","asset_60668d999bbaf663420340f7bdd580d7.json","asset_b2e0fc821c6886fb3940f85a3320003e.ttf","asset_3e6805fbc794680014716b8c752f20b8.json","asset_3c851d60ad5ef3f2fe43ebd263490d78.ttf","asset_1a0e3525dd5df87e77057204129a5e6e.json","asset_a37b0c01c0baf1888ca812cc0508f6e2.ttf","asset_7e078700f0c35367a56c5bbb2047dda7.json","asset_8e7f807ef943bff1f6d3c2c6e0f3769e.ttf","asset_fdc01171a7a7ea76b187afcd162dee7d.json","asset_d2285965fe34b05465047401b8595dd0.ttf","asset_647543ebfccf6e5495434383598453d1.json","asset_5cdf883b18a5651a29a4d1ef276d2457.ttf","asset_74d124a3caeac2bea111f3ca2f2dd34a.json","asset_7d40544b395c5949f4646f5e150fe020.png","asset_cdd04e13d4ec83ff0cd13ec8dabdc341.png","asset_a132ecc4ba5c1517ff83c0fb321bc7fc.png","asset_0ea69b5077e7c4696db85dbcba75b0e1.png","asset_f5b790e2ac193b3d41015edb3551f9b8.png","asset_5223c8d9b0d08b82a5670fb5f71faf78.png","asset_fd0192cf977ddf7b60b4e21e332f6b76.json","asset_15e61754d2d3825004eed075f496ae28.png","asset_778ffc9fe8773a878e9c30a6304784de.png","asset_376d6a4c7f622917c39feb23671ef71d.png","asset_c79c3606a1cf168006ad3979763c7e0c.png","asset_02bc1fa7c0313217bde2d65ccbff40c9.png","asset_35ba0eaec5a4f5ed12ca16fabeae451d.png"],"id":"#matheusms21/portaDoSol","releaseId":"c05eb142-056f-40e6-a330-79bd258d0e14","revisionId":"0.0.1-r.OkgIqpx_B","publishedTime":"2020-10-04T03:29:57.730Z","commitTime":"2020-10-04T03:29:57.793Z","bundleUrl":"https://d1wp6m56sqw74a.cloudfront.net/%40matheusms21%2FportaDoSol%2F0.0.1%2Fecb187f580b4c9bbd9873239fc05375e-38.0.0-android.js","releaseChannel":"default","hostUri":"exp.host/#matheusms21/portaDoSol"}
Error: ENOENT: no such file or directory, open '/app/turtle/workingdir/android/sdk38/android-shell-app/app/src/main/res/drawable/splashscreen.xml'
The strange thing is that yesterday I managed to finish the build, but today I have this error, and I did not make any changes to SplashScreen or anything like that.
Thanks to anyone who can help me.
Now the build finished without the error.
It was probably their mistake that was corrected at this point.
Thank you all :)

How to fix relative module error for a newly created nuxt.js app with starter template?

I tried to create a nuxt app with the guide from the official website, chose default options because I wanted the starter template but on running npm run dev, I keep encountering the error:
This relative module was not found:
* ./components/nuxt-error.vue in ./.nuxt/index.js
I've tried searching about it but I couldn't find any useful resource/fix. I've also tried vue init nuxt-community/starter-template for the installation but I still get the same error.
Any fixes?
So I found a solution. I couldn’t figure out the error because the nuxt-error.vue file was actually imported correctly. Turns out “npm” installations have been giving me issues (had issues with TailwindCSS too).
So if you ever encounter this error on loading the base nuxt app, recreate the project using “yarn” instead. Works like magic!
This Error basically means, that in one of your files you are trying to import another file with the relative path of ./components/nuxt-error.vue but no file with this path exists.
However
I just read that vue init nuxt-community/starter-template is deprecated and no longer maintained. Instead of fixing this Error you should restart your project with npx create-nuxt-app <yourAppName>. https://github.com/nuxt-community/starter-template

Angular flex-layout in Ionic3... rxjs/operator not found?

Trying to use #angular/flex-layout in an existing npm-enabled Ionic 3 project.
Adding "FlexLayoutModule" to my main module's imports won't allow the app to start, saying that: cannot find module "rxjs/operators" is the cause.
Already cleared node_module, npm install, reinstalled Ionic CLI. Nothing helps. Could it be a version conflict? Moreover, I'm already using Observables in this project. I don't get it. And the import of "FlexLayoutModule" is in cause of this issue (disabling the import removes the issue).
Anyone could be successful at using flex-layout with ionic? I've seen this plunk, but it uses system.js, so not 100% reproducing my goal.
http://plnkr.co/edit/y8R0MF?p=info
Edit: a more verbose issue:
Uncaught (in promise): Error: Cannot find module "rxjs/operators"
Error: Cannot find module "rxjs/operators" at Object.580
(http://localhost:8100/build/22.main.js:319:7) at webpack_require
(http://localhost:8100/build/main.js:48:30) at Object.1021
(http://localhost:8100/build/22.main.js:11:79) at webpack_require
(http://localhost:8100/build/main.js:48:30) at
http://localhost:8100/build/main.js:122015:10 at t.invoke
(http://localhost:8100/build/polyfills.js:3:9283) at Object.onInvoke
(http://localhost:8100/build/main.js:4650:37) at t.invoke
(http://localhost:8100/build/polyfills.js:3:9223) at r.run
(http://localhost:8100/build/polyfills.js:3:4452) at
http://localhost:8100/build/polyfills.js:3:14076
I'm getting a similar error with Angular CLI. Everything is OK until I include FlexLayoutModule in the app's NgModule imports. Then I get the error:
Module not found: Error: Can't resolve 'rxjs/operators' in 'D:\dev\Vms.Signup.Client\node_modules\#angular\flex-layout\esm5'
I updated to the latest rxjs and that seems to have fixed it.