babel installation failure/error detailed solution
**问题:**在VSCode中执行命令 npm install --global babel-cli
报以下错误:
[email protected]: core-js@❤️.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
solution:
- First open the directory where you want to install babel in cmd, mine is: E:\VSCode\npm\node-global
- Global installation, enter the command
npm install --global @babel/core @babel/cli
3. Check whether the installation is successful
babel --version
4. Check if babel --version is used in other places. For example, when I come to the D drive
, I succeed here because I have configured the environment variable path
5. If you report the following error: "'babel' is not an internal or external command, nor is it Runnable program or batch file." To configure the environment variable path
to configure the environment variable:
- Right-click This PC, click Properties
2. Pull down to find the advanced system settings 3. Click the environment variable
4. Find the path, click Edit
5. Click New, enter the installation directory of babel just above E:\VSCode\npm\node-global, and then confirm
6. Finally, verify whether it is successful again. After configuring the variables, you must reopen the cmd window. If the version number appears, it
will
be successful. Guys solve it here: http://t.csdn.cn/yeKj2