Skip to content

V1.2.0 does not work with React-Native #414

Description

@el-lsan

After updating wpapi from 1.1.2 to 1.2.0, my RN app does not run anymore and the packager throw following error:

bundling failed: Error: Unable to resolve module `li` from `PROJECT_PATH/node_modules/wpapi/lib/autodiscovery.js`: Module `li` does not exist in the Haste module map

As packager suggested, I did remove the node_modules folder, clean the cache and reinstall node modules and didn't help.
But running yarn add li and restarting the packager did help and fixed the issue.
However I don't see such note on this repo.

So either it's a bug in 1.2.0 or the readme file should be updated.

FYI, pretty much the same issue was happening with url module with version 1.1.2. So with every new version of node-wpapi some dependencies are missing out of box 😄!

Activity

  1. jerolan commented on Jan 23, 2019

    @jerolan
    Contributor

    It seems that the dependency "li" is marked as a devDependency i think it should be marked as a normal dependency

  2. added 2 commits that reference this issue on Jan 23, 2019
    6ff00fd
    dafddc4
  3. kadamwhite commented on Jan 23, 2019

    @kadamwhite
    Collaborator

    Thank you @el-lsan for raising the issue, and @jerolan for the quick patch! I have merged this to the v1 branch and released v1.2.1 addressing the change.

  4. kadamwhite commented on Jan 23, 2019

    @kadamwhite
    Collaborator

    with every new version of node-wpapi some dependencies are missing out of box 😄!

    My sincere apologies 😞 I'll open an issue to add dependency validation to the release process.

  5. el-lsan commented on Jan 23, 2019

    @el-lsan
    Author

    @jerolan, @kadamwhite Thank you for your quick response/fix.
    Cheers 🍻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions