Simply trying to import the library to use for the first time in the boilerplate AwesomeProject for react-native (non-expo version), I get the following error:
error: bundling failed: Error: Unable to resolve module `./FilterType` from `/Users/dc/Projects/AwesomeProject/node_modules/react-native-video/Video.js`: The module `./FilterType` could not be found from `/Users/dc/Projects/AwesomeProject/node_modules/react-native-video/Video.js`. Indeed, none of these files exist:
* `/Users/dc/Projects/AwesomeProject/node_modules/react-native-video/FilterType(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)`
* `/Users/dc/Projects/AwesomeProject/node_modules/react-native-video/FilterType/index(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)`
at ModuleResolver.resolveDependency (/Users/dc/Projects/AwesomeProject/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:120:15)
at ResolutionRequest.resolveDependency (/Users/dc/Projects/AwesomeProject/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:49:18)
at DependencyGraph.resolveDependency (/Users/dc/Projects/AwesomeProject/node_modules/metro/src/node-haste/DependencyGraph.js:219:16)
at Object.resolve (/Users/dc/Projects/AwesomeProject/node_modules/metro/src/lib/transformHelpers.js:141:30)
at dependencies.map.result (/Users/dc/Projects/AwesomeProject/node_modules/metro/src/DeltaBundler/traverseDependencies.js:373:31)
at Array.map (<anonymous>)
at resolveDependencies (/Users/dc/Projects/AwesomeProject/node_modules/metro/src/DeltaBundler/traverseDependencies.js:369:18)
at /Users/dc/Projects/AwesomeProject/node_modules/metro/src/DeltaBundler/traverseDependencies.js:188:33
at Generator.next (<anonymous>)
at step (/Users/dc/Projects/AwesomeProject/node_modules/metro/src/DeltaBundler/traverseDependencies.js:298:30)
Peeking inside node_modules/react-native-video reveals the FilterType.js file is not there.
AwesomeProject project: react-native init AwesomeProjectnpm install --save react-native-video; react-native link react-native-videoApp.js to import react-native-video: import Video from 'react-native-video';react-native run-iosI expect it to run and load the default application without issue.
Seems this is directly related to this commit:
https://github.com/react-native-community/react-native-video/commit/5e684d40c830edf4156219a0ed79fa650334e7c5
Which added FilterType.js, but package.json hasn't been updated so that this file is included in the files property. This needs quite an urgent fix @cobarx
@deanc Thanks for the heads up. I didn't even think to test the published package last night since the source tree was working.
I've pushed out 4.0.1 to fix this.
Sorry for the inconvenience everyone!
@cobarx it's aight, friend. we all do it ;) thanks for fixing so quickly, highly appreciate!
Most helpful comment
@deanc Thanks for the heads up. I didn't even think to test the published package last night since the source tree was working.
I've pushed out 4.0.1 to fix this.
Sorry for the inconvenience everyone!