Libraries installed but didn't work in react-native environment - react-native

Anytime I install Library, whether it is, native base or react-native text-input effects.it gives the same error every time..
I don't know what's causing an issue here.
error: bundling failed: Error: While trying to resolve module
native-base` from file `/home/jas/Hopper/screen/Home.js`, the package `
/home/jas/Hopper /node_modules/native-base/package.json` was successfully
found. However, this package itself specifies a `main` module field that
could not be resolved (`/home/jas/Hopper/node_modules/native-base/dist
/src/index.js`. Indeed, none of these files exist:

Delete the build folder in /node_modules/native-base/android/app

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).

compile errors after upgrading to latest CRA

I just updated to latest create-react-app (web pack 5). And am now getting the following errors (I'm just showing the first 2 errors here). Any help explaining what this error means and how to fix it would be greatly appreciated. I don't think the problem is with react-pdf because I created a new create-react-app project that uses that package and there's no problem.
{
Compiled with problems:X
ERROR in ./node_modules/react-pdf/node_modules/#babel/runtime/helpers/esm/inherits.js 1:0-46
Module not found: Error: Can't resolve './setPrototypeOf' in '/Users/bob/dev/workbox-web/node_modules/react-pdf/node_modules/#babel/runtime/helpers/esm'
Did you mean 'setPrototypeOf.js'?
BREAKING CHANGE: The request './setPrototypeOf' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
ERROR in ./node_modules/react-pdf/node_modules/#babel/runtime/helpers/esm/objectWithoutProperties.js 1:0-74
Module not found: Error: Can't resolve './objectWithoutPropertiesLoose' in '/Users/bob/dev/workbox-web/node_modules/react-pdf/node_modules/#babel/runtime/helpers/esm'
Did you mean 'objectWithoutPropertiesLoose.js'?
BREAKING CHANGE: The request './objectWithoutPropertiesLoose' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
}
Somehow I was accessing a wrong version of babel after CRA upgrade to 5. Deleting node_modules and re-installing was not enough. I needed to delete node_modules and yarn.lock and then yarn install - and then all was ok.

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

Getting Epubjs-rn working

I can't get this library working. I've followed the directions but end up with this error at runtime.
the package [...]/node_modules/epubjs-rn/package.json was successfully found. However, this package itself specifies a main module field that could not be resolved

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.