npm run build ERROR in static_js_vendor.e475838be75c71f87b37.js from UglifyJs

简介: npm run build ERROR in static_js_vendor.e475838be75c71f87b37.js from UglifyJs

一个 vue2.0 项目,执行 npm run dev 正常,但是 npm run build 出现打包错误,

xxx@xxx:~/xxx/src/frontend$ npm run build 
> test@1.0.0 build /home/xxx/src/frontend
> node build/build.js
Hash: 4003cde5faa0b066a0a7
Version: webpack 3.8.1
Time: 8660ms
                                              Asset       Size  Chunks                    Chunk Names
           static/js/vendor.e475838be75c71f87b37.js    1.72 MB       0  [emitted]  [big]  vendor
              static/js/app.bf4b159892d6feccb271.js    13.6 kB       1  [emitted]         app
         static/js/manifest.01542bfecf9357fb0249.js    1.49 kB       2  [emitted]         manifest
static/css/app.9746d34b80301e3f963132f72e9f5f23.css     106 kB       1  [emitted]         app
       static/js/vendor.e475838be75c71f87b37.js.map    2.13 MB       0  [emitted]         vendor
          static/js/app.bf4b159892d6feccb271.js.map    68.5 kB       1  [emitted]         app
     static/js/manifest.01542bfecf9357fb0249.js.map    14.2 kB       2  [emitted]         manifest
                                         index.html  829 bytes          [emitted]         
ERROR in static/js/vendor.e475838be75c71f87b37.js from UglifyJs
Unexpected token: name (Simple) [./node_modules/cbor/lib/simple.js:9,0][static/js/vendor.e475838be75c71f87b37.js:4155,6]
  Build failed with errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test@1.0.0 build: `node build/build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the test@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/xxx/.npm/_logs/2017-10-27T07_45_42_739Z-debug.log

cbor 包导致的错误 解决方式 : 在 webpack.base.conf.js 中找到 rules 修改 test: /\.js$/ 内容如下

{
        test: /\.js$/,
        loader: 'babel-loader',
        include: [resolve('src'), resolve('test'), resolve('node_modules/cbor')]
 },
目录
相关文章
|
3月前
|
前端开发 数据安全/隐私保护
Uncaught (in promise) Error: Request failed with status code 404 at createError (createError.js:
Uncaught (in promise) Error: Request failed with status code 404 at createError (createError.js:
|
13天前
|
缓存 JavaScript 前端开发
成功解决:npm 版本不支持node.js。【 npm v9.1.2 does not support Node.js v16.6.0.】
这篇文章介绍了如何解决npm版本与Node.js版本不兼容的问题,提供了查看当前npm和Node.js版本的步骤,以及如何根据Node.js版本选择合适的npm版本并进行升级的详细指导。
成功解决:npm 版本不支持node.js。【 npm v9.1.2 does not support Node.js v16.6.0.】
|
30天前
|
JavaScript
【Deepin 20系统】Jupyter notebook解决ValueError: Please install Node.js and npm before continuing installa
文章讨论了在Deepin 20系统上安装Jupyter Notebook的debug插件时出现的"ValueError: Please install Node.js and npm before continuing installation"错误,并提供了使用conda安装Node.js的解决方法。
54 1
|
19天前
Crypto-JS——Uncaught Error: Malformed UTF-8 data
Crypto-JS——Uncaught Error: Malformed UTF-8 data
24 0
|
2月前
|
JavaScript API
若依没解构送post请求出现的bug,vue.runtime.esm.js:620 [Vue warn]: Error in mounted hook: “TypeError: (0 , _inde
若依没解构送post请求出现的bug,vue.runtime.esm.js:620 [Vue warn]: Error in mounted hook: “TypeError: (0 , _inde
|
2月前
|
JavaScript 开发工具
支付系统----微信支付22------初始化Vue项目,npm run serve -- -- port 8888,Vue默认打开是8888的写法
支付系统----微信支付22------初始化Vue项目,npm run serve -- -- port 8888,Vue默认打开是8888的写法
|
2月前
|
JavaScript
TS,编写TS文件,编写hello.ts文件,cmd下打开终端,输入tsc hello.ts会生成一个hello.js文件,简化命令,npm i -g ts-node,ts-node hello.ts
TS,编写TS文件,编写hello.ts文件,cmd下打开终端,输入tsc hello.ts会生成一个hello.js文件,简化命令,npm i -g ts-node,ts-node hello.ts
|
2月前
|
JavaScript
【解决方案】vue 项目 npm run dev 时报错:‘cross-env‘ 不是内部或外部命令,也不是可运行的程序
【解决方案】vue 项目 npm run dev 时报错:‘cross-env‘ 不是内部或外部命令,也不是可运行的程序
209 0
|
3月前
|
JavaScript
# 解决输入任何npm命令都报Error: Cannot find module ‘are-we-there-yet‘
# 解决输入任何npm命令都报Error: Cannot find module ‘are-we-there-yet‘

推荐镜像

更多
下一篇
云函数