In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "how to install Babel in the front end of web". In daily operation, I believe many people have doubts about how to install Babel in the front end of web. The editor consulted all kinds of materials and sorted out a simple and easy-to-use method of operation. I hope it will be helpful to answer the doubt of "how to install Babel in the front end of web". Next, please follow the editor to study!
Babel upgrade to 7.x pit summary
Recently, I have been busy with my work. I haven't written about front-end play for some time. Try to build a project today, found all kinds of holes, used to be very good configuration files all kinds of error reports. After inspection, I found that the original babel upgraded a large version, which has reached 7.x. Here I would like to summarize the holes I stepped on in the upgrade process.
Error:Cannotfindmodule'@babel/core'
AtFunction.Module._resolveFilename (module.js:547:15)
AtFunction.Module._load (module.js:474:25)
AtModule.require (module.js:596:17)
Atrequire (internal/module.js:11:18)
....
How to install babel
@ babel/core was not found. You need to uninstall babel-core and install @ babel/core again.
Npmunbabel-core
ERRORin./src/index.jsx
Modulebuildfailed (from./node_modules/babel-loader/lib/index.js):
Error:Plugin/Presetfilesarenotallowedtoexportobjects,onlyfunctions.
...
Uninstall babel-preset-*, reinstall @ babel/preset-*, and modify presets in .babelrc.
At this point, the study on "how to install Babel in the front end of web" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 205
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.