The babel installation failed/reported an error. The detailed solution reported the following error: [email protected]: core-js@<3.23.3 is no longer maintained and not recommended

16453737:

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:

  1. First open the directory where you want to install babel in cmd, mine is: E:\VSCode\npm\node-globalinsert image description here
  2. Global installation, enter the command npm install --global @babel/core @babel/cli
    insert image description here3. Check whether the installation is successful
babel --version

insert image description here4. Check if babel --version is used in other places. For example, when I come to the D drive
insert image description here, 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:

  1. Right-click This PC, click Properties

insert image description here
2. Pull down to find the advanced system settings= 3. Click the environment variable
insert image description here
4. Find the path, click Edit
insert image description here5. Click New, enter the installation directory of babel just above E:\VSCode\npm\node-global, and then confirm

insert image description here6. Finally, verify whether it is successful again. After configuring the variables, you must reopen the cmd window. If the version number appears, it
insert image description here
will
be successful. Guys solve it here: http://t.csdn.cn/yeKj2

Guess you like

Origin blog.csdn.net/m0_60817176/article/details/127627806