reactour icon indicating copy to clipboard operation
reactour copied to clipboard

export 'Portal' (imported as 'Portal') was not found in '@reactour/utils'

Open Joaroise opened this issue 1 year ago • 3 comments

I use reactour in a project, and all gone perfectly till yesterday. Yesterday I download my project from git and I can’t make it works. The complete error message says: “Attempted import error: 'Portal' is not exported from '@reactour/utils' (imported as 'Portal'). ERROR in ./node_modules/@reactour/tour/dist/tour.esm.js 845:36-42 export 'Portal' (imported as 'Portal') was not found in '@reactour/utils' (possible exports: Observables, bestPositionOf, getInViewThreshold, getPadding, getRect, getWindow, inView, isHoriz, isOutsideX, isOutsideY, safe, smoothScroll, useElemRect, useIntersectionObserver, useRect)”

Comparing with one other installation of the project where it works, I have been able to find that the diference is between the @reactour/utils versions. Where works is 0.4.0 and where not is 0.4.6. After I read something similar at the answer of other of the isues here, I tried to solve it adding to package.json the field: "overrides": { "@reactour/utils": "0.4.0" } But it also not works.

Can you give me a solution or tell me where I could be wrong?

Thanks.

P.D: I pretty newer on programation world. I apologize if anything I say is not properly explained. I still have to much to learn.

Joaroise avatar Sep 13 '22 08:09 Joaroise

Hi @Joaroise, thanks for open the Issue.

Can you please provide the @reactour/tour are you using?

The portal exported from /utils was the source of some packages versions and build issues and it was removed, allowing the user to implement (in case of need) their own through Wrapper prop. Here is the implementation, using a custom Portal component in the demo.

The issue should be solved if you are using the last version of /tour, please let me know in any case.

elrumordelaluz avatar Sep 13 '22 10:09 elrumordelaluz

I had this same problem! @elrumordelaluz's resolution worked for me. I updated package @reactour/tour to version 3.1.4.

Thank you so much!

Allyson-Santana avatar Sep 14 '22 16:09 Allyson-Santana

thank you @Allyson-Santana to share your (re)solutio!

updating into v3.1.4 you still need the resolution workaround?

elrumordelaluz avatar Sep 15 '22 06:09 elrumordelaluz