报错如下

Module build failed: Error: The node API for `babel` has been moved to `babel-core`.

在我配置loader 的时候出现如上问题

配置文件部分如下

{
test: /\.js/,
loader: "babel",
}

解决方法:

改为 babel-loader

并安装babel-loader

{
test: /\.js/,
loader: "babel-loader",
}

配置web pack loader 报错:Module build failed: Error: The node API for `babel` has been moved to `babel-core`.的更多相关文章

  1. vue.js报错:Module build failed: Error: No parser and no file path given, couldn't infer a parser.

    ERROR Failed to compile with 2 errors 12:00:33 error in ./src/App.vue Module build failed: Error: No ...

  2. 出现报错: module build failed error couldn't find preset es2015 relative to directory

    当用webpack 进行 build 的时候, 会出现如上标题的错误, 解决方式是在 上级 或者 上上级目录,删除 .babelrc 文件

  3. nuxt/eapress 安装报错Module build failed: ValidationError: PostCSS Loader Invalid OptionsModule build failed: ValidationError: PostCSS Loader Invalid Options options['useConfigFile'] is an invalid additi

    错误信息: Module build failed: ValidationError: PostCSS Loader Invalid Options options['useConfigFile'] ...

  4. webpack搭建项目时出现的报错“Module build failed (from ./node_modules/css-loader/dist/cjs.js) CssSyntaxError”

    控制台出现的错误如下: webpack.config.js中的配置如下: module.exports={ entry:'./src/main.js', output:{ path:__dirname ...

  5. vue项目报错,解决Module build failed: Error: Cannot find module 'node-sass' 问题

    1.报错问题 1 E:\WebStormFile\treehole-manage>npm run dev > xc-ui-pc-sysmanage@1.0.0 dev E:\WebStor ...

  6. vue-cli 报Module build failed: Error: No parser and no file path given, couldn't infer a parser.错的解决方法

    出错提示如下: ERROR Failed to compile with errors :: error in ./src/App.vue Module build failed: Error: No ...

  7. Module build failed: Error: Cannot find module 'url-loader' 的坑

    本文地址:http://www.cnblogs.com/jying/p/8280956.html 开发环境:react.webpack.es5 引用图片报错:Module build failed: ...

  8. MODULE BUILD FAILED: ERROR: COULDN’T FIND PRESET “ES2015” RELATIVE TO DIRECTORY

    npm run dev 遇到报错: Module build failed: Error: Couldn't find preset "es2015" relative to di ...

  9. Vue, element-ui Module build failed: Error: No PostCSS Config found

    使用vue框架写pc页面时,我们经常会用到element-ui这个框架. 当我们吧把需要的东西都装在好运行项目的时候,有时会出现这样的错误, Module build failed: Error: N ...

随机推荐

  1. 2018 Multi-University Training Contest 9 杭电多校第九场 (有坑待补)

    咕咕咕了太久  多校博客直接从第三场跳到了第九场orz 见谅见谅(会补的!) 明明最后看下来是dp场 但是硬生生被我们做成了组合数专场…… 听说jls把我们用组合数做的题都用dp来了遍 这里只放了用组 ...

  2. Shell-求平均

    Compute the Average Given integers, compute their average correct to three decimal places. Input For ...

  3. shiro登录验证原理

    这段时间有点忙,没咋写博客,今天打开staruml看到以前画的一张shiro原理图,先在这发一下,空了再好好进行分析.

  4. bug笔记(pc)

    1.如果a标签中的href没有设置,那么点击的这个按钮的时候,这个页面会自动刷新!!! Bug:   <a href=”” class=”btn”></a>类似这种情况,点击a ...

  5. python3+requests库框架设计05-unittest单元测试框架

    unittest单元测试框架,主要由四部分组成:测试固件.测试用例.测试套件.测试执行器 测试固件(test fixture) 测试固件有两部分,执行测试前的准备部分setUp(),测试执行完后的清扫 ...

  6. CentOS6.5 上crontab每天自动备份mysql数据库

    步骤: 1. sudo vi /etc/crontab  #编辑crontab任务 2.输入01 12 * * * root /usr/local/mysql/backup/backup.sh > ...

  7. 开源录屏工具 Best Screen Recording Open Source Software For Windows 2017

    OBS Studio OBS (Open Broadcaster Software) - Free and open source software for live streaming and sc ...

  8. PHPExcel导出数据时字段超过26列出错Invalid cell coordinate [1

    http://blog.csdn.net/dl425134845/article/details/46650961 以下是解决方案函数 /** *   方法名:    getExcel *   作用  ...

  9. 是armhf,还是armel?

    本文译至:https://blogs.oracle.com/jtc/entry/is_it_armhf_or_armel ARM处理器有各种品牌和规格,其中一部分的原因涉及到市场问题,成本,大小和功耗 ...

  10. js之雪花飘落

    有很多网站都有雪花或花瓣飘落的特效,看上去很好看.我来用js实现这个效果. 在写代码之前可以先引入bass.css对样式做下处理: 1.html部分 先建一个文件夹,在body中插入如下代码 < ...