i am trying to create an app that can connect with metamask using walletconnect/react-native-dapp but i get this problem - react-native

i am trying to create an app that can connect with metamask using walletconnect/react-native-dapp but i get this problem.
What went wrong:
A problem occurred evaluating project ':app'.
Could not find method compile() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

for anyone encountering this down the road... Here's the solution.
React native dependencies in node_modules sometimes use outdated syntax such as the error above "compile" when it should be "implementation" depending on your RN version. I'd use the npm package patch-package or stack overflow how to properly modify dependencies (node_modules) to persist once you install another package.
I ran into this same issue with the same "walletconnect" amoung other errors but finally got it running - keep debugging! You got this.

Related

Cannot use import statement outside a module when using wrangler v2

I'm new to using cloudflare and wrangler. I've a project that I've been working on, and I'm now trying to deploy it using wrangler publish, but I keep running into issues. My product is coded in node.js, and I'm using version 2 of wrangler. When I execute wrangler publish I get:
Basic JavaScript project found. Skipping unnecessary build!
Error: Something went wrong with the request to Cloudflare...
Uncaught SyntaxError: Cannot use import statement outside a module
at worker.js:2Basic JavaScript project found. Skipping unnecessary build!
Error: Something went wrong with the request to Cloudflare...
Uncaught SyntaxError: Cannot use import statement outside a module
at worker.js:2
I've searched for a solution, and one of them that I found said to change module in wrangler.toml from type="javascript"to type="webpack" however that gives me a bunch of errors:
./node_modules/destroy/index.js
Module not found: Error: Can't resolve 'fs' ... Parsed request is a module...resolve as module
/Users/Desktop/APIs/cpiCalculator2/node_modules/destroy/node_modules doesn't exist or is not a directory
...
Error: webpack returned an error. You may be able to resolve this issue by running npm install.
I've tried reinstalling npm as it suggests and then wrangler publish again, but that just gives me the same error message.
I'm really not sure what the issue is, and I would really appreciate any help or advice on how to resolve this issue. Thank you!
Also, just a note, I'm not sure if this is affecting it, but I do have two other js documents in the main area of my project (where my index.js file is).

Facing "A problem occurred evaluating project-rabbitmq" in react-native

I'm trying to create a rabbitmq client for a remote server with react-native. I found multiple packages for that ( react-native-rabbitmq and react-native-amqp ), both of them don't work and give the same error :
A problem occurred evaluating project ':react-native-rabbitmq'.
> Could not find method compile() for arguments [directory 'libs'] on object of type
org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
These two are the only packages that give me this error, tried to add and delete other package and that works fine. I also tried to change gradle version to older and newer ones ( also did this with package versions ). Wiping user data from virtual device and created new one didn't work neither. Same with deleting and recreating node_modules.
What am i doing wrong ?

how to fixed Module not found : syntax error

I follow the Getting Started, Writing a Secret Contract, Creating a React Front-End, but I get this
Syntax Error about enigma_dapp/client/src/App.js
I copy the Creating a React Front-End said App.js, Error follow the pictures
Picture as following the "Module", "Failed"
Module not found
Failed to compile
If I didn’t add Writing a Secret Contract, Creating a React Front-End part
I get “Enigma setup still loading”
Picture as follow the "Original view"
Original view
I'm sure the /enigma_dapp/ have package.json
and /enigma_dapp/client/ have package.json, package-lock.json, yarn.lock
but /enigma_dapp/client/src/ don't have any of them, how can I fix the problem?
I receive the solution about this enigma version.
It's a early version , so it's not available now. (or bugs a lot)
https://forum.enigma.co/t/app-js-and-syntax-error/1090

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

flowtype errors in base AwesomeProject

I recently wanted to reset a react-native project to most recent version, and so I initialised the seed project - "AwesomeProject"... The problem is that it comes with 19 flowtype errors "out of the box"
node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/NavigationCardStackStyleInterpolator.js
lines:91,94,97,104,107,137,142,148
node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/NavigationHeaderStyleInterpolator.js
lines:57,68,74,87,94
node_modules/react-native/Libraries/Experimental/WindowedListView.js
lines:629, 629, 665,665
node_modules/react-native/Libraries/Image/Image.ios.js
line:272
I am reluctant to make changes to these files as it may create knock on effects. Does anyone have a work around?
In general, whenever you want flow to ignore a file, you can just specify that file under the [ignore] section of your .flowconfig.
That said, I just react-native init'd a project, using react-native-cli 1.0.0 and react-native 0.29.1, and ran a flow server on the root of my project, and didn't get any errors.