I am getting below error when I use the latest react version along with react Helmet. I am using hooks and trying to use a Helmet as documented. This issue comes only when we build the project but when I run locally Helmet works perfectly fine with React hooks.
Below is the link of error which I am getting in the console:
https://reactjs.org/docs/error-decoder.html/?invariant=321
Request your help to know what can be the possible solution.
I am seeing something similar
react-scripts build
Creating an optimized production build...
Failed to compile.
./src/pages/Home.tsx
Attempted import error: 'react-helmet' does not contain a default export (imported as 'Helmet').
[ERROR] An error occurred while running subprocess react-scripts.
react-scripts build exited with exit code 1.
Re-running this command with the --verbose flag may provide more information
Apologies, we need to update the documentation. With 6.0.0 you can import {Helmet} from "react-helmet" now.
Ah awesome,
Good thing we caught it during a ci
Thanks
Most helpful comment
Apologies, we need to update the documentation. With 6.0.0 you can
import {Helmet} from "react-helmet"now.