Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-native-unimodules could not be found within the project. #90

Closed
Srijans-nd opened this issue Aug 3, 2020 · 8 comments
Closed
Labels
bug Something isn't working

Comments

@Srijans-nd
Copy link

After updating to version 3.0.0, build is failing with below error.

Unable to resolve module react-native-unimodulesfromnode_modules/@highcharts/highcharts-react-native/src/HighchartsReactNative.js: react-native-unimodules could not be found within the project.

I was using 2.2.3 before this, and did not face this error. However, I was unable to get chart to render on iOS.
I was getting Error: '@highcharts/highcharts-react-native/highcharts-layout/css/styles.css' cannot be loaded as its extension is not registered in assetExts

Tried approaches mentioned in #39, so updated to 3.0.0 as per Sebastian's comment.

@axelav
Copy link

axelav commented Aug 3, 2020

I encountered this error when trying to use the beta as well. Is there a peer dependency that needs to be installed? What's changed?

@axelav
Copy link

axelav commented Aug 3, 2020

I've added react-native-unimodules and metro-config to my project:

    ...
    "react-native-unimodules": "^0.10.1",
    "metro-config": "^0.61.0",
    ...

and copied the metro.config.js from here: https://github.com/highcharts/highcharts-react-native/blob/master/metro.config.js

This fixes the problem originally reported here, but the library is still broken:

Error: Unable to resolve module `./http://127.0.0.1:19001/src/index` from ``: 

None of these files exist:
  * http:/127.0.0.1:19001/src/index(.native|.ios.expo.ts|.native.expo.ts|.expo.ts|.ios.expo.tsx|.native.expo.tsx|.expo.tsx|.ios.expo.js|.native.expo.js|.expo.js|.ios.expo.jsx|.native.expo.jsx|.expo.jsx|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.wasm|.native.wasm|.wasm)
  * http:/127.0.0.1:19001/src/index/index(.native|.ios.expo.ts|.native.expo.ts|.expo.ts|.ios.expo.tsx|.native.expo.tsx|.expo.tsx|.ios.expo.js|.native.expo.js|.expo.js|.ios.expo.jsx|.native.expo.jsx|.expo.jsx|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.wasm|.native.wasm|.wasm)
    at ModuleResolver.resolveDependency (/Users/axel/s/pillar/hermes/node_modules/react-native/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:163:15)
    at ResolutionRequest.resolveDependency (/Users/axel/s/pillar/hermes/node_modules/react-native/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:52:18)
    at DependencyGraph.resolveDependency (/Users/axel/s/pillar/hermes/node_modules/react-native/node_modules/metro/src/node-haste/DependencyGraph.js:287:16)
    at /Users/axel/s/pillar/hermes/node_modules/react-native/node_modules/metro/src/lib/transformHelpers.js:267:42
    at Server.<anonymous> (/Users/axel/s/pillar/hermes/node_modules/react-native/node_modules/metro/src/Server.js:841:41)
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/Users/axel/s/pillar/hermes/node_modules/react-native/node_modules/metro/src/Server.js:99:24)
    at _next (/Users/axel/s/pillar/hermes/node_modules/react-native/node_modules/metro/src/Server.js:119:9)
Error: Unable to resolve module `./index` from ``: 

None of these files exist:
  * index(.native|.ios.expo.ts|.native.expo.ts|.expo.ts|.ios.expo.tsx|.native.expo.tsx|.expo.tsx|.ios.expo.js|.native.expo.js|.expo.js|.ios.expo.jsx|.native.expo.jsx|.expo.jsx|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.wasm|.native.wasm|.wasm)
  * index/index(.native|.ios.expo.ts|.native.expo.ts|.expo.ts|.ios.expo.tsx|.native.expo.tsx|.expo.tsx|.ios.expo.js|.native.expo.js|.expo.js|.ios.expo.jsx|.native.expo.jsx|.expo.jsx|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.wasm|.native.wasm|.wasm)
    at ModuleResolver.resolveDependency (/Users/axel/s/pillar/hermes/node_modules/react-native/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:163:15)
    at ResolutionRequest.resolveDependency (/Users/axel/s/pillar/hermes/node_modules/react-native/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:52:18)
    at DependencyGraph.resolveDependency (/Users/axel/s/pillar/hermes/node_modules/react-native/node_modules/metro/src/node-haste/DependencyGraph.js:287:16)
    at /Users/axel/s/pillar/hermes/node_modules/react-native/node_modules/metro/src/lib/transformHelpers.js:267:42
    at Server.<anonymous> (/Users/axel/s/pillar/hermes/node_modules/react-native/node_modules/metro/src/Server.js:841:41)
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/Users/axel/s/pillar/hermes/node_modules/react-native/node_modules/metro/src/Server.js:99:24)
    at _next (/Users/axel/s/pillar/hermes/node_modules/react-native/node_modules/metro/src/Server.js:119:9)

@Lakkanna
Copy link

Lakkanna commented Aug 4, 2020

I have tried installing react-native-unimodules, but I got following error after installing
image

does V3 works fine in expo managedflow or need to convert expo project to bareflow

@Denyllon
Copy link
Contributor

Denyllon commented Aug 4, 2020

Hello @Srijans-nd ,

Thank you for reporting the issue.
It is caused by the fact that the dependency react-native-unimodules is missing in the package.json of the npm's package, and when installing dependencies, manager does not know that it is required. I will fix it as fast as I can.

Kind regards!

@Denyllon Denyllon added the bug Something isn't working label Aug 4, 2020
@sam17896
Copy link

I am still getting this error, was the updated packaged published on npm ?

@Denyllon
Copy link
Contributor

@sam17896

Have you tried to use the latest v3.1.1 release? Does the problem still exist?

@sam17896
Copy link

@Denyllon yes the problem still exist for me.. for the record i am not using expo, my problem is created from react-native-cli, is there additional step that i may have to do?

@Denyllon
Copy link
Contributor

Denyllon commented Aug 19, 2020

@sam17896 @Lakkanna @axelav
Please take a look on this comment: #91 (comment), follow the steps which you did not do, apply them, and let us know about the result.
Would be really appreciated to get some in fo about the result after doing those changes.

Kind regards!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants