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')]
 },
目录
相关文章
|
2月前
|
JavaScript
npm install没问题,但npm run dev的时候报Node Sass version 6.0.1 is incompatible with ^4.0.0 ^5.0.0
npm install没问题,但npm run dev的时候报Node Sass version 6.0.1 is incompatible with ^4.0.0 ^5.0.0
24 0
|
19天前
|
前端开发 数据安全/隐私保护
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:
|
2月前
|
资源调度 JavaScript Linux
nvm, node.js, npm, yarn 安装配置
nvm, node.js, npm, yarn 安装配置
98 1
|
2天前
|
运维 JavaScript Devops
阿里云云效操作报错合集之node.js构建时,报错:The build failed because the process exited too early.该怎么办
本合集将整理呈现用户在使用过程中遇到的报错及其对应的解决办法,包括但不限于账户权限设置错误、项目配置不正确、代码提交冲突、构建任务执行失败、测试环境异常、需求流转阻塞等问题。阿里云云效是一站式企业级研发协同和DevOps平台,为企业提供从需求规划、开发、测试、发布到运维、运营的全流程端到端服务和工具支撑,致力于提升企业的研发效能和创新能力。
|
3天前
|
JavaScript
# 解决输入任何npm命令都报Error: Cannot find module ‘are-we-there-yet‘
# 解决输入任何npm命令都报Error: Cannot find module ‘are-we-there-yet‘
|
2月前
|
弹性计算 Dubbo Serverless
Serverless 应用引擎操作报错合集之阿里函数计算中配置完fc,出现‘Function instance exited unexpectedly(code 1, message:operation not permitted) with start command 'npm run start '. 报错如何解决
Serverless 应用引擎(SAE)是阿里云提供的Serverless PaaS平台,支持Spring Cloud、Dubbo、HSF等主流微服务框架,简化应用的部署、运维和弹性伸缩。在使用SAE过程中,可能会遇到各种操作报错。以下是一些常见的报错情况及其可能的原因和解决方法。
|
2月前
|
iOS开发 MacOS
WAServiceMainContext.js:2 Error: MiniProgramError
WAServiceMainContext.js:2 Error: MiniProgramError
155 0
|
2月前
|
JavaScript 前端开发
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory 内存溢出问题
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory 内存溢出问题
38 1
|
2月前
|
JavaScript 前端开发 开发者
Node.js的包管理和npm工具深度解析
【4月更文挑战第30天】本文深入解析Node.js的包管理和npm工具。包管理促进代码复用和社区协作,包包含元数据描述文件`package.json`和入口文件。npm提供搜索、安装、发布等功能,通过命令行进行操作,如`install`、`search`、`uninstall`。npm支持版本控制、全局安装、脚本定义及私有仓库。理解和熟练运用npm能提升Node.js开发效率。
|
2月前
|
JavaScript Linux Python
Linux 安装 Node.js | NPM
Linux 安装 Node.js | NPM
35 0

推荐镜像

更多