-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
[Packager] can't resolve sha.js dependency (or any other with "." in name) #1055
Comments
@mvayngrib did you ever get this resolved? |
yea, sadly I didn't have time to dig in too deep so i hacked https://github.com/facebook/react-native/blob/master/packager/react-packager/src/DependencyResolver/haste/DependencyGraph/index.js#L121 from var id = sansExtJs(name); to var id = name; and everything worked |
@mvayngrib How were you originally defining the requirements? Would you be able to provide an example project where this error occurs. That would help out a lot. |
here's a sample project: https://github.com/mvayngrib/breakdotdep all i did was:
in index.ios.js add
then hit Run and open Chrome Dev Tools and see:
|
Fixed this internally, should go out in the next sync. Sorry for the delay. |
awesome! |
Hi, I have the same problem with ddp.js even after applying the fix |
…d, fix bugs etc) Summary: @public Fixes facebook#773, facebook#1055 The resolver was getting a bit unwieldy because a lot has changed since the initial writing (porting node-haste). This also splits up a large complex file into the following: * Makes use of classes: Module, AssetModule, Package, and AssetModule_DEPRECATED (`image!` modules) * DependencyGraph is lazy for everything that isn't haste modules and packages (need to read ahead of time) * Lazy makes it fast, easier to reason about, and easier to add new loaders * Has a centralized filesystem wrapper: fast-fs (ffs) * ffs is async and lazy for any read operation and sync for directory/file lookup which makes it fast * we can easily drop in different adapters for ffs to be able to build up the tree: watchman, git ls-files, etc * use es6 for classes and easier to read promise-based code Follow up diffs will include: * Using new types (Module, AssetModule etc) in the rest of the codebase (currently we convert to plain object which is a bit of a hack) * using watchman to build up the fs * some caching at the object creation level (we are recreating Modules and Packages many times, we can cache them) * A plugin system for loaders (e.g. @tadeuzagallo wants to add a native module loader) Test Plan: * ./runJestTests.sh react-packager * ./runJestTests.sh PackagerIntegration * Export open source and run the e2e test * reset cache * ./fbrnios.sh run and click around
@venocl This for sure works in the latest version 0.7.0-rc.2 I just installed |
sha.js, bn.js, dns.js all result in errors like:
Requiring module "testdot/index.ios" with unresolved dependencies: testdot/index.ios is waiting for sha.js/index
sha.js/index is not defined
The text was updated successfully, but these errors were encountered: