react-helmet-async icon indicating copy to clipboard operation
react-helmet-async copied to clipboard

Module parse failed: unexpected token

Open utopictown opened this issue 1 year ago • 5 comments

i got this when run yarn start, what configuration that i need to implement?

./node_modules/react-helmet-async/lib/index.esm.js 374:12
Module parse failed: Unexpected token (374:12)
File was processed with these loaders:
 * ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
| var isDocument = !!(typeof window !== "undefined" && window.document && window.document.createElement);
| var HelmetData = class {
>   instances = [];
|   canUseDOM = isDocument;
|   context;

this is some of my packages that might be useful to debug

"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-helmet-async": "^2.0.4",
"@babel/preset-env": "^7.1.0",
"@types/recordrtc": "^5.6.11",
"babel-plugin-import": "^1.7.0",
"babel-plugin-object-to-json-parse": "0.0.7",
"customize-cra": "^0.9.1",
"env-cmd": "^10.1.0",
"less-watch-compiler": "1.14.6",
"npm-run-all": "^4.1.2",
"react-app-alias": "^2.2.2",
"react-app-rewire-less": "^2.1.3",
"react-app-rewired": "^2.1.5",
"react-scripts": "^3.4.4",

utopictown avatar Jan 04 '24 10:01 utopictown

me too

qzai666 avatar Jan 23 '24 09:01 qzai666

Anything on that?

Petar-Pankov avatar Feb 21 '24 13:02 Petar-Pankov

I got the same error with

    "react-helmet-async": "^2.0.4",,
    "react": "^17.0.2",
    "react-dom": "^17.0.2",

I tried to downgrade and the first version that works is :

"react-helmet-async": "^1.3.0"

is not a perfect but for now is the better solution I found

LSauter68140 avatar Apr 02 '24 10:04 LSauter68140

+1

mvaldetaro avatar Apr 10 '24 20:04 mvaldetaro

me too

agata avatar May 27 '24 05:05 agata