这是因为,引用的插件在node_modules里,并不在vue-cli的es6编译范围内,所以语法报错,修改方法:

vue2.x 在引用插件的时候,npm run dev跑正常 ,npm run build 报错vue-cli Unexpected token: punc (() [的更多相关文章

  1. vue项目npm run dev 报错Uncaught SyntaxError: Unexpected token <

    目前代码所处位置是micro分支,该分支是从dev分支直接拉下来进行npm run dev的,而dev分支是可以正常运行的,网上的诸多解释是babel转义时候报错,其实对比可见,两个分支不同的地方应该 ...

  2. 关于npm run build 报错解决方案

    # 特定的错误 ERROR in statics/mobile/js/vendor.cef13a0e680a5bc0d8b3.js from UglifyJsUnexpected token: pun ...

  3. homestead虚拟机,通过npm下载依赖包和解决运行gulp报错问题 yarn出错问题

    homestead虚拟机,通过npm下载依赖包和解决运行gulp报错问题 yarn出错问题 1. 在虚拟器运行 npm 下载依赖组件时报错: npm ERR! EPROTO: protocol err ...

  4. vue-electron 使用sqlite3数据库,执行npm run build 报错 .NET Framework 2.0 SDK,Microsoft Visual Studio 2005[C:\temp\wechat\node_modules\sqlite3\build\binding.sln]

    问题描述 vue-electron 使用sqlite3数据库,执行npm run build 报错如下: .NET Framework 2.0 SDK,Microsoft Visual Studio ...

  5. 小程序使用npm模块(引入第三方UI),报错的多种解决办法。

    前言引入第三方模块时,我遇到了很多坑. 首先是微信.第三方模块的文档描述不清楚.其次.搜索到的博客,大部分是抄的文档 / 相互转载抄袭.作用有限. 于是,我自己做了各种条件下的测试.解决各种情况的引入 ...

  6. npm run dev 启动错误:Module build failed: Error: No PostCSS Config found in:xxxxxxxxxxxxxx

    解决办法:在根目录新建postcss.config.js module.exports = { plugins: { 'autoprefixer': {browsers: 'last 5 versio ...

  7. npm run build报错 ,resolve is not defined

    今天在build项目的时候报: ReferenceError: resolve is not defined npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ...

  8. npm run build报错(npm ERR! code ELIFECYCLE)的解决办法

    具体报错如下图: 环境:centos7 应该node_modules安装问题,我们需要重新安装 rm -rf node_modules rm package-lock.json npm cache c ...

  9. 转载:TypeError: Cannot read property 'compilation' of undefined vue 打包运行npm run build 报错

    转载自:https://www.jianshu.com/p/3f8f60e01797 运行npm run build打包时,报错如下:   我的package.json如下: { ... " ...

  10. command failed: npm install --loglevel error --registry=https://registry.npm 用vue-cli 4.0 新建项目总是报错

    昨天新买的本本,今天布环境,一安装vue-cli发现都4.0+的版本了,没管太多,就开始新建个项目感受哈,一切运行顺利,输入 "vue create app" 的时候,一切貌似进展 ...

随机推荐

  1. MS SQL计算最大公约数和最小公倍数函数

    /*求两个数的最大公约数*/ CREATE FUNCTION f_GetGys ( @num1 BIGINT , @num2 BIGINT ) RETURNS BIGINT AS BEGIN DECL ...

  2. R语言之Apriori算法

    ---恢复内容开始--- 1.概念 关联分析:用于发现隐藏在大型数据集中的有意义的联系 项集:0或多个项的集合.例如:{啤酒,尿布,牛奶,花生} 是一个4-项集,意义想象成爸爸去超市买啤酒和花生,给儿 ...

  3. SQL优化方法:

    1.查看连接对象 1 USE master 2 GO 3 --如果要指定数据库就把注释去掉 4 SELECT * FROM sys.[sysprocesses] WHERE [spid]>50 ...

  4. Unbuntu 16.04 英文环境安装中文输入法

    ubuntu 16.04 使用的是ibus输入系统,没有预装中文输入法,你要自己安装一下.以中文拼音输入法为例:1.sudo apt install ibus-pinyin2.sudo apt ins ...

  5. 【安富莱二代示波器教程】第18章 附件C---波形拟合

    完整教程下载地址:http://forum.armfly.com/forum.php?mod=viewthread&tid=45785 第18章      附件C---波形拟合 emWin5. ...

  6. qq跳转

    给<a href="http://wpa.qq.com/msgrd?v=3&uin=1061214467&site=qq&menu=yes">& ...

  7. [Swift]LeetCode300. 最长上升子序列 | Longest Increasing Subsequence

    Given an unsorted array of integers, find the length of longest increasing subsequence. Example: Inp ...

  8. [Swift]LeetCode441. 排列硬币 | Arranging Coins

    You have a total of n coins that you want to form in a staircase shape, where every k-th row must ha ...

  9. [Swift]LeetCode807. 保持城市天际线 | Max Increase to Keep City Skyline

    In a 2 dimensional array grid, each value grid[i][j]represents the height of a building located ther ...

  10. [Swift]LeetCode861. 翻转矩阵后的得分 | Score After Flipping Matrix

    We have a two dimensional matrix A where each value is 0 or 1. A move consists of choosing any row o ...