reactour: Can't Import Mask from ECMA
import steps from "./steps";
import { TourProvider } from "@reactour/tour";
i haven’t done any code yet, i am just importing the package and on that i am facing the error below. i have tried upgrading the react-scripts didn’t worked though.
Can’t import the named export ‘Mask’ from non EcmaScript module (only default export is available)

About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 3
- Comments: 31 (10 by maintainers)
“Hello Joel, for react-scripts version 4.0.3, which is the same version I am currently using, you will need to make some adjustments to the Webpack configuration within Create React App (CRA). You can find more information on this in the following link: https://github.com/elrumordelaluz/reactour/issues/512#issuecomment-1314836667. Keep in mind that while CRA utilizes Webpack, configuring it without ejecting react-scripts can be difficult. You may want to consider using a tool like CRACO or react-app-rewired to help with this process.”
if you decide to use CRACO, you will have a craco.config.js file like this:
for someone using react-scripts 4.
using webpack configuratior like Craco:
Thank you @barjabeen12, however seems that you are using the
v1or reactour, while @hglowiak2022 seems to have this issue using the lasts versions of@reactour/tour.Keep in mind that v1 doesn’t make use of the Provider, and the docs are in a different location.
Yes, i can. Further i will share a sandbox link in a while with implementation.
Hey everyone! So basically what i did was avoided using provider from
reactour/tourand imported the Tour directly from reactour. its working for me.update: This issue was coming specifically while import tourProvider from
@reactour/tour. i just importedimport Tour from 'reactour'working fine now.@elrumordelaluz Thanks for the quick response, i just updated my comment above.