zoukankan      html  css  js  c++  java
  • TypeError: this.setDynamic is not a function

    启动项目npm run serve 报错

    Module build failed (from ./node_modules/_babel-loader@8.0.6@babel-loader/lib/index.js):
    TypeError: this.setDynamic is not a function

    原因:vue项目用的是最新的babel7版本,在.babel.config.js中使用的还是之前的插件.babel7之后的插件一般都是以@babel开头的,下载新版的babel安装包之后再运行就可以了

    package.json

    "devDependencies": {
        "@babel/plugin-transform-runtime": "^7.5.5",
        "@babel/preset-env": "^7.5.5",
    }
     
    babel.config.js
    module.exports = {
      presets: [
        '@vue/app'
      ],
      plugins: ["@babel/plugin-transform-runtime"],
      comments: false,
      env: {
        test: {
          presets: ["@babel/preset-env"],
          plugins: ["istanbul"]
        }
      }
    }
     
     
  • 相关阅读:
    架构基础-CAP原理
    Nginx基础
    Nginx基础
    Nginx基础
    Nginx基础
    Nginx基础
    Nginx基础
    Nginx基础
    CentOS 7 架设LNMP动态网站
    Linux下文件描述符
  • 原文地址:https://www.cnblogs.com/steamed-twisted-roll/p/11243398.html
Copyright © 2011-2022 走看看