angular 9 库发布错误“试图发布已由 Ivy 编译的包" [英] angular 9 library publish error "Trying to publish a package that has been compiled by Ivy"

查看:18
本文介绍了angular 9 库发布错误“试图发布已由 Ivy 编译的包"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将我的 angular 8.x.x 项目迁移到 angular 9.x.x,当我尝试发布我的库时,它失败并显示以下错误

I migrated my angular 8.x.x project to angular 9.x.x and when I try to publish my library, it fails with below error

npm 错误!@candiman/website@9.0.0 prepublishOnly: node --eval "console.error('ERROR: 试图发布一个已经由 Ivy 编译的包.这是不允许的.\n请删除并重建包,在尝试发布之前,无需使用 Ivy 进行编译.\n')" &&退出1

npm ERR! @candiman/website@9.0.0 prepublishOnly: node --eval "console.error('ERROR: Trying to publish a package that has been compiled by Ivy. This is not allowed.\nPlease delete and rebuild the package, without compiling with Ivy, before attempting to publish.\n')" && exit 1

angular 9

推荐答案

UPDATE ANGULAR 12

在构建库时使用 --configuration production 选项修复了我的问题

using the --configuration production option while building the library fixed my issue

ng build --configuration production


原答案:


Original answer:

在构建库时使用 --prod 选项修复了我的问题

using --prod option while building the library fixed my issue

ng build yourLibraryName --prod

这篇关于angular 9 库发布错误“试图发布已由 Ivy 编译的包"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆