'Unable to resolve module react-native' when install react-native library - react-native

I'm trying to create some audio and video playback. I've tried to install several library like react-native-video, react-native-video-player but it keeps throw error 'Unable to resolve module react-native-video-player from C:\Users\AHT\OneDrive\Desktop\ignite-youth\features\fuel\screens\SeriesPost.tsx: react-native-video-player could not be found within the project or in these directories: node_modules'. I just normally import the library like this:
import VideoPlayer from 'react-native-video-player';
Any one has solution? Thank you

Related

Unable to import a npm module I downloaded

I'm running a SvelteKit application with the Animate on Scroll (aos) module. This worked like a charm but due to the nature of my project, I needed to modify a few lines in the module, so I pulled the project from GitHub, modified it, rebuilt it and imported it via a local dependency:
"dependencies": {
"aos": "file:/path/to/aos"
}
Whenever I try to import the module now however: import AOS from 'aos';, I get this error message:
Uncaught (in promise) SyntaxError: The requested module '/#fs/C:/path/to/aos/dist/aos.js' does not provide an export named 'default'
Note that this also happens when I pull the repository and try to import it locally without changing it. Why does this happen and how can I fix it?

react-native-progress-webview Unable to resolve module

I found this project interesting at the NPM,
https://www.npmjs.com/package/react-native-progress-webview
however I followed the instruction, it shows the following error:
error: bundling failed: Error: Unable to resolve module `react-native-progess-webview` from `mycomponent.js`: Module `react-native-progess-webview` does not exist in the Haste module map
I already installed 'react-native-webview' and it works fine, however react-native-progess-webview seems not able to be imported.
I am just simply importing the library like this:
import ProgressWebView from "react-native-progess-webview";
How to solve?
I found that it is a typo in the tutorial, in the tutorial it is:
import ProgressWebView from "react-native-progess-webview";
but the correct one is:
import ProgressWebView from "react-native-progress-webview";
There is an "r" in the "progress".

Error importing NPM module to nativescript app

Trying to import #nimiq/core or #nimiq/core-web or https://cdn.nimiq.com/nimiq.js to my Nativescript app but I can't found the way.
I've already tried with nativescript-nodeify but it thows and error in nativescript-vue (which I'm using)
Error is: Cannot find module '[...]\platforms\android\app\src\main\assets\app\tns_modules\nativescript-nodeify\patch-npm-packages.js'.

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.

Unable to load video.js into Aurelia module using 'import'

I'm working with Video.js, and am running into a problem when attempting to load the module using a standard ES6 import.
I installed video.js using:
npm install --save video.js.
I'm importing into my
video-player.js file using:
import videojs from 'video.js';
I'm getting the following error when attempting to load the page:
GET http://localhost:9001/dist/video.js.js 404 (Not Found)
Any idea why I'm seeing the .js.js extension, and why this is not working? This is the procedure recommended in the Video.js docs.
Aurelia automatically adds the .js extension so you can remove that. Also, make sure you have correctly added video.js as a dependency to aurelia.json. Is the location correct in /dist?