Remove babel-core and use @babel/core, storybook still using babel-core
See original GitHub issueDescribe the bug forcing to reinstall storybook doesnt work to use @babel/core.
package.json
"dependencies": {
"prop-types": "15.6.0",
"react": "16.2.0",
"styled-components": "4.2.0"
},
"devDependencies": {
"@babel/core": "^7.4.4",
"@babel/preset-env": "^7.4.4",
"@babel/preset-react": "^7.0.0",
"@storybook/addon-actions": "^5.0.11",
"@storybook/addon-links": "^5.0.11",
"@storybook/addons": "^5.0.11",
"@storybook/react": "^5.0.11",
"babel-eslint": "^10.0.1",
"babel-loader": "^7.1.5",
"babel-plugin-styled-components": "1.5.1",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-transform-object-assign": "6.22.0",
"babel-plugin-transform-object-rest-spread": "6.26.0",
"babel-polyfill": "6.26.0",
"babel-preset-env": "^1.6.0",
"bundle-loader": "0.5.6",
"clean-webpack-plugin": "^0.1.17",
"enzyme": "3.1.0",
"eslint": "4.10.0",
"eslint-config-airbnb": "16.1.0",
"eslint-config-airbnb-base": "12.1.0",
"eslint-config-prettier": "2.6.0",
"eslint-import-resolver-webpack": "^0.11.1",
"eslint-loader": "2.0.0",
"eslint-plugin-import": "2.8.0",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-prettier": "2.3.1",
"eslint-plugin-react": "^7.13.0",
"eslint_d": "^7.1.1",
"file-loader": "1.1.11",
"html-webpack-plugin": "3.2.0",
"jasmine-core": "2.8.0",
"jsdom": "11.3.0",
"karma": "1.7.1",
"karma-chrome-launcher": "2.2.0",
"karma-jasmine": "1.1.0",
"karma-jsdom-launcher": "6.1.2",
"karma-junit-reporter": "1.2.0",
"karma-webpack": "2.0.5",
"node-sass": "4.11.0",
"prettier": "1.7.4",
"stylelint": "^9.4.0",
"stylelint-config-recommended": "^2.1.0",
"stylelint-config-styled-components": "^0.1.1",
"stylelint-custom-processor-loader": "^0.5.0",
"stylelint-processor-styled-components": "^1.3.2",
"uglifyjs-webpack-plugin": "1.2.5",
"webpack": "4.8.3",
"webpack-cli": "^3.3.2",
"webpack-dev-server": "3.1.4",
"webpack-merge": "4.1.0"
},
"peerDependencies": {
"react": "^16.2.0",
"styled-components": "^3.3.2"
},
To Reproduce Steps to reproduce the behavior:
- npx -p @storybook/cli sb init --type react -f ERROR in ./.storybook/config.js Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: Cannot find module ‘babel-core’ at Function.Module._resolveFilename (module.js:547:15) at Function.Module._load (module.js:474:25) at Module.require (module.js:596:17) at require (internal/module.js:11:18)
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Remove babel-core and use @babel/core, storybook still ...
Describe the bug forcing to reinstall storybook doesnt work to use @babel/core. package.json "dependencies": { "prop-types": "15.6.0", ...
Read more >Cannot find module '@babel/core' error [Solved] | bobbyhadz
If the error is not resolved, try restarting your IDE and your development server. If you still get the error, try to delete...
Read more >How to Webpack 5 with Babel - Setup Tutorial
A step by step tutorial on how to integrate Babel into Webpack to access powerful JavaScript features (ES6, ES7, ES8, ES9) from the...
Read more >error: index.js: Cannot find module 'babel-plugin-r' React Native
js: Cannot find module 'babel-plugin-r' Require stack: D:\Work\React Native\React Native with Node\healthapp\node_modules@babel\core\lib\config\ ...
Read more >babel/register
One of the ways you can use Babel is through the require hook. The require hook. ... npm install @babel/core @babel/register --save-dev.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you use
"babel-loader": "^7.1.5",
you should addbabel-core
yourself.Upgrade to “babel-loader”: “^8”, to use the
@babel/core
Hey there, it’s me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!