Reakit: 'forceFocus' is not exported from 'reakit-utils/tabbable'

Created on 4 Nov 2019  路  4Comments  路  Source: reakit/reakit

馃悰 Bug report

Current behavior

Trying to build a React application which uses the Popover component, the following error is shown:

../node_modules/reakit/es/Dialog/Dialog.js
Attempted import error: 'forceFocus' is not exported from 'reakit-utils/tabbable'.

Possible solutions

Dialog is trying to import forceFocus which has been renamed to ensureFocus since https://github.com/reakit/reakit/pull/458

I think this will need renaming everywhere.

Environment

  System:
    OS: Linux 5.0 Ubuntu 19.04 (Disco Dingo)
    CPU: (2) x64 Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz
    Memory: 1.47 GB / 7.69 GB
    Container: Yes
    Shell: 5.0.3 - /bin/bash
  Binaries:
    Node: 10.15.3 - ~/.nvm/versions/node/v10.15.3/bin/node
    Yarn: 1.16.0 - ~/.nvm/versions/node/v10.15.3/bin/yarn
    npm: 6.4.1 - ~/.nvm/versions/node/v10.15.3/bin/npm
can't reproduce

Most helpful comment

I've encountered this issue with beta-9, after removing my node_modules folder and reinstalling the packages (I have only reakit in my package.json, no reakit-utils).
My assumption is that a caret version is being used somewhere, so an incompatible version is being installed. This can be solved by either pinning the versions or using semantic versioning correctly, i.e., changing the minor/major version after API changes. It is not a big deal, as it is a beta version and a fix is trivial (update reakit to the latest version). Just wanted to write it down to avoid similar issues in the future.

All 4 comments

Hey @stphnnnn :wave:,

Thank you for opening an issue. We'll get back to you as soon as we can.
Please, consider supporting us on Open Collective. We give a special attention to issues opened by backers.

If you use Reakit at work, you can also ask your company to sponsor us :heart:.

This has been already renamed. I can't reproduce this issue. Could you please provide a CodeSandbox?

This seems to be working now. I think I had the latest version of reakit-utils but an older version of reakit where the export was not renamed.

Sorry for the premature issue, love this library so far!

I've encountered this issue with beta-9, after removing my node_modules folder and reinstalling the packages (I have only reakit in my package.json, no reakit-utils).
My assumption is that a caret version is being used somewhere, so an incompatible version is being installed. This can be solved by either pinning the versions or using semantic versioning correctly, i.e., changing the minor/major version after API changes. It is not a big deal, as it is a beta version and a fix is trivial (update reakit to the latest version). Just wanted to write it down to avoid similar issues in the future.

Was this page helpful?
0 / 5 - 0 ratings