-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Heyyy, so I am having a problem where only by importing the library i gett this error:
Metro has encountered an error: While trying to resolve module
'react-native-
mesh-gradient from file '/Users/ Armando09/PROGRA2/javascript/reactNative/ baiaUI/app/index.jsx*, the package / Users/Armando09/PROGRA2/javascript/ reactNative/baiaUI/node_modules/react-native-mesh-gradient/package.json* was successfully found. However, this package itself specifies a 'main module field that could not be resolved (*/Users/ Armando09/PROGRA2/javascript/reactNative/ baiaUI/node_modules/react-native-mesh-gradient/lib/commonjs/index.js'. Indeed, none of these files exist:
- /Users/Armando09/PROGRA2/javascript/ reactNative/baiaUI/node_modules/react-native-mesh-gradient/lib/commonjs/ index.js(.ios.ts|.native.ts|.ts|.ios.tsx| .native.tsx|.tsx|.ios.mjs|.native.mjs|.mj s/.ios.js|.native.js|.js/.ios.jsx|.native
•jsx|.jsx.ios.json.native.json|.json.i os.cjs|.native.cjs|.cjs|.ios.scss|.native .scss|.scss|.ios.sass|.native.sass|.sass| .ios.css|.native.css|.css) - /Users/Armando09/PROGRA2/javascript/ reactNative/baiaUI/node_modules/react-native-mesh-gradient/lib/commonjs/ index.js/ index(.ios.ts|.native.ts|.ts/.ios.tsx|.na tive.tsx|.tsx|.ios.mjs|.native.mjs|.mjs|. ios.js|.native.js|.js|.ios.jsx|.native.js x|.jsx|.ios.json|.native.json|.json|.ios. cjs|.native.cjs|.cjs|.ios.scss|.native.sc ss| .scss|.ios.sass|.native.sass|.sass|.10 s.css|.native.css|.css): /Users/ Armando09/PROGRA2/javascript/reactNative/ baiaUI/node_modules/metro/src/node-haste/ DependencyGraph.js (243:17)
241
}
242
if (error instanceof
InvalidPackageError) {
243 |
throw new
PackageResolutionError({
244
packageError: error,
245
originModulePath:from,
246 |
targetModuleName: to,
I did install the library and i got the error.
Things to coonsider:
- I am using expo to run the app
- When viewing the installed module on /node_modules, the folder of 'react-native-mesh-gradient' only contains a package.json file
- I tried installing the liibrary manually by downloading the zip from github and putting it with the correct name, in node_modules, and I got the same error
Hope anyone could help me, thank yoouu