Error: Unknown option: .preset. Check out https://babeljs.io/docs/en/babel-core/#options for more in
最新推荐文章于 2024-04-23 14:38:16 发布
最新推荐文章于 2024-04-23 14:38:16 发布
阅读量9.7k
ERROR
in ./src/index.
js
Module build failed (from ./node_modules/
babel
-loader/lib/index.
js
):
Error
: Cannot find module ' @
babel
/p
reset
-
en
v' from 'F:\web\视频学习敲代码\webpack\loader'
1,环境的配置(包的安装),package.
js
on,检查正确
2,webpack的配置,即webpack.
WordPress multi industry theme is a theme of multi industry p
reset
architecture launched by us after compreh
en
sive integrat
io
n in 2019. We will continue to increase theme p
reset
data in the future so that users in differ
en
t industries can easily use this changeable flexible and extremely conv
en
i
en
t theme.We have developed a full architecture demonstrat
io
n data import for this theme which will cover multiple industries. One click import data will completely import the data you need to import into huff website architecture of your own industry for complete import you can more easily build your own website.
ERROR
in ./src/index.
js
Module build failed (from ./node_modules/
babel
-loader/lib/index.
js
):
Error
:
Unknown
option
: .p
reset
.
Check
out
https
://
babel
js
.
io
/
doc
s/
en
/
babel
-
core
/#
options
for more infor.
babel
: 无法加载文件 \
babel
.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅
https
:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execut
io
n_Policies。
所在位置 行:1 字符: 1
babel
src -d dist
+ CategoryInfo : Security
Error
: () [],PSSecurityExcept
io
..
由于webpack版本的不同各个配置的写法令人头疼,在使用
core
-
js
过程中报了如下错误(此时我用的4.0版本)
Unknown
option
: .useBuiltIns.
Check
out
https
://
babel
js
.
io
/
doc
s/
en
/
babel
-
core
/#
options
for more informat
io
n about
options
. Maybe you meant to use
以下是具体报错信息
在配置
core
-
js
的时候少写了一层use所以会报这个错,加上就可以了。
A common cause of this
error
is the pres
en
ce of a configurat
io
n
options
object without the corresponding p
reset
name. Example: Invalid: `{ p
reset
s: [{
option
: value}] }` Valid: `{ p
reset
s: [['p
reset
Name', {
option
: value}]] }` For more detailed informat
io
n on p
reset
configurat
io
n, please see
https
://
babel
js
.
io
/
doc
s/
en
/
plugin
s#
plugin
p
reset
s-
options
. (While processing p
reset
: "/Users/helei/work/study/os-front/node_modules/@vue/cli-
plugin
-
babel
/p
reset
.
js
") at Logger.
error
(/Users/helei/work/study/os-front/node_modules/
babel
-
core
/lib/transformat
io
n/file/logger.
js
:41:11) at
Option
Manager.merge
Options
(/Users/helei/work/study/os-front/node_modules/
babel
-
core
/lib/transformat
io
n/file/
options
/
option
-manager.
js
:226:20) at /Users/helei/work/study/os-front/node_modules/
babel
-
core
/lib/transformat
io
n/file/
options
/
option
-manager.
js
:265:14 at /Users/helei/work/study/os-front/node_modules/
babel
-
core
/lib/transformat
io
n/file/
options
/
option
-manager.
js
:323:22 at Array.map (<anonymous>) at
Option
Manager.resolveP
reset
s (/Users/helei/work/study/os-front/node_modules/
babel
-
core
/lib/transformat
io
n/file/
options
/
option
-manager.
js
:275:20) at
Option
Manager.mergeP
reset
s (/Users/helei/work/study/os-front/node_modules/
babel
-
core
/lib/transformat
io
n/file/
options
/
option
-manager.
js
:264:10) at
Option
Manager.merge
Options
(/Users/helei/work/study/os-front/node_modules/
babel
-
core
/lib/transformat
io
n/file/
options
/
option
-manager.
js
:249:14) at
Option
Manager.init (/Users/helei/work/study/os-front/node_modules/
babel
-
core
/lib/transformat
io
n/file/
options
/
option
-manager.
js
:368:12) at File.init
Options
(/Users/helei/work/study/os-front/node_modules/
babel
-
core
/lib/transformat
io
n/file/index.
js
:212:65) at new File (/Users/helei/work/study/os-front/node_modules/
babel
-
core
/lib/transformat
io
n/file/index.
js
:135:24) at Pipeline.transform (/Users/helei/work/study/os-front/node_modules/
babel
-
core
/lib/transformat
io
n/pipeline.
js
:46:16) at transpile (/Users/helei/work/study/os-front/node_modules/
babel
-loader/lib/index.
js
:50:20) at Object.module.exports (/Users/helei/work/study/os-front/node_modules/
babel
-loader/lib/index.
js
:173:20)
ERROR
Error
loading E:\daima\vue\vue项目\vue-lokoes\project-v2\vue.config.
js
:
ERROR
Refer
en
ce
Error
: ture is not defined
Refer
en
ce
Error
: ture is not defined
at Object. (E:\daima\vue\vue项目\vue-lokoes\project-v2\vue.config.
js
:3:15)
at Mod
webpack:
Unknown
option
: .useBuiltIns,Module build failed
ERROR
in ./src/
js
/index.
js
Module build failed (from ./node_modules/
babel
-loader/lib/index.
js
):
Error
: [
BABEL
] E:\betterLifeFuture\webpack\13.
js
兼容性处理\src\
js
\index.
js
:
Unknown
option
: .useBuiltIns. Ch
Unknown
option
: .useBuiltIns.
Check
out
https
://
babel
js
.
io
/
doc
s/
en
/
babel
-
core
/#
options
for more informat
io
n about
options
.
To be a valid p
reset
, its name and
options
should be wrapped in a pair of brackets
什么是
Babel
官方解释,是下一代JavaScript 语法的编译器。
既然是下一代Javascript的标准,浏览器因版本的不同对此会有兼容性问题,JavaScript的新的方法都不能使用,但是目前我们在项目开发一直提倡使用最新的语法糖编写,不但能减少代码量,而且async,await等新特性还解决了回调的编写机制,减轻了代码维护成本。
Babel
就因此而生,它可以让你放心使用大部分的Java...
参考:
https
://
babel
js
.
io
https
://www.
babel
js
.cn
babel
-***、@
babel
/***的包总是占一堆,但是又不太清楚是干嘛的,所以特地看了下文档,整理和摘抄如下:
@
babel
/
core
核心功能,
babel
从版本7开始用@开头的scope包,老版本是
babel
-
core
,其他的包都是一样的规律
@
babel
/
plugin
-***
很多,不列举了,单独配...
用的是antd design vue生成的项目,按着官网的提示一步一步下来,在配置
babel
-
plugin
-import时候发生了报错,一直找了很久没有解决问题,
项目可以正常运行,当配置
babel
-
plugin
-import时的问题
引入可以正常运行
import Button from “ant-design-vue/lib/button”;
import “ant-design-vu...