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

\node_modules\wpapi\lib\http-transport.js: Module does not exist in the module map or in these directories: #300

Closed
geekeren opened this issue Mar 9, 2017 · 5 comments

Comments

@geekeren
Copy link

geekeren commented Mar 9, 2017

when add this library into my React Native project,,these is an error when I start ReactNative server:

Unhandled promise rejection (rejection id: 797): UnableToResolveError: Unable to resolve module url from E:\AndroidProject\RNBlog\ReactNative\node_modules\wpapi\lib\http-transport.js: Module does not exist in the module map or in these directories:
E:\AndroidProject\RNBlog\ReactNative\node_modules\wpapi\node_modules
, E:\AndroidProject\RNBlog\ReactNative\node_modules
Anyone know why?

@kadamwhite
Copy link
Collaborator

kadamwhite commented Mar 9, 2017 via email

@geekeren
Copy link
Author

geekeren commented Mar 9, 2017

@kadamwhite 4.1.2;I have upgrated npm to version 4.3.0,the error ocucerd all the same

@kadamwhite
Copy link
Collaborator

kadamwhite commented Mar 9, 2017

Possibly related: facebook/react-native#7686

I'm tied up at a conference today but can take a look at this by tomorrow afternoon if it doesn't sort itself out

@geekeren
Copy link
Author

geekeren commented Mar 9, 2017

@kadamwhite I do as your suggestion but it doesn't work, then I install wpapi and react-native on ubuntu system,the error occured ,too,like Windows system

@geekeren
Copy link
Author

This issue has been solved:when using this client in react-native project, the dependency of url and util is required.you can add dependencies in package.json like this:

  "dependencies": {
    "react": "16.0.0-alpha.6",
    "react-native": "0.43.4",
    "react-native-menu": "^0.20.2",
    "url": "^0.11.0",
    "util": "^0.10.3",
    "wpapi": "^1.0.3"
  },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants