Open ValentinH opened 1 year ago
I am struggling with the same problem, minute ago i updated
"@babel/core": "^7.21.8",
"@babel/preset-env": "^7.21.5",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.21.5",
"babel-jest": "^29.5.0",
"babel-loader": "^9.1.2",
then i got info to install "babel-plugin-dynamic-import-node": "^2.3.3"
after adding this lib babel problem looks solved.
edit: or maybe deleting node_modules, yarn.lock and then reinstall instead will be enough
rm -rf node_modules
rm yarn.lock
yarn install
I saw similar issues that I traced to the change from babel-loader 8.3.0 to 9.x. Forcing babel-loader resolution to 8.3.0 appeared to work, but I'm still investigating.
I am struggling with the same problem, minute ago i updated
"@babel/core": "^7.21.8", "@babel/preset-env": "^7.21.5", "@babel/preset-react": "^7.18.6", "@babel/preset-typescript": "^7.21.5", "babel-jest": "^29.5.0", "babel-loader": "^9.1.2",
then i got info to install
"babel-plugin-dynamic-import-node": "^2.3.3"
after adding this lib babel problem looks solved.edit: or maybe deleting node_modules, yarn.lock and then reinstall instead will be enough
rm -rf node_modules rm yarn.lock yarn install
Deleting node_modules, yarn.lock and reinstall did work for me, thanks 💯 💯
Describe the bug
While updating from
6.5.12
to7.0.12
, I'm facing a compilation error that I don't understand:Especially the
Property key of ObjectProperty expected node to be of a type ["Identifier","StringLiteral","NumericLiteral"] but instead got "Identifier"
as it complains aboutIdentifier
not being the list of types that does containIdentifier
🤔To Reproduce
I'm sorry but I'm not able to create a reproduction as this seems very specific to our setup that is closed-source. I understand that this issue will get less attention but I'm still trying if someone else faced the same weird babel message 🤞
System
Additional context
To bring a bit more context: We are using a Yarn v3 monorepo and our apps are using Next.js. Therefore, I'm using the
@storybook/nextjs
framework setup. Here's my config:From the docs, I wasn't sure if I should manually create a
.babelrc.json
file as I didn't have one before. I tried creating it usingnpx storybook@latest babelrc
but it did not fix the issue.