Closed hsuanxyz closed 3 years ago
English version?
English version?
updated
Anyone knows why ng update @angular/cdk updates @angular/common, @angular/compiler, @angular/core and @angular/forms to version ~10.0.0-next.2 ?
Ng-Zorro安装后运行发生record.factory is not a function是什么原因
@zhang0101 hope it helps you, https://github.com/angular/angular/issues/35282
ng update ng-zorro-antd
Using package manager: 'npm'
Collecting installed dependencies...
Found 37 dependencies.
Fetching dependency metadata from registry...
Updating package.json with dependency ng-zorro-antd @ "9.2.1" (was "8.3.1")...
UPDATE package.json (1898 bytes)
✔ Packages installed successfully.
Executing migrations of package 'ng-zorro-antd'
❯ Updates NG-ZORRO to v9 [https://github.com/NG-ZORRO/ng-zorro-antd/issues/5035] ✖ Migration failed: Cannot read property 'startTag' of undefined See "/private/var/folders/w0/r_snx5vx6y1c9vfwx1vzfbwh0000gn/T/ng-wNDsTu/angular-errors.log" for further details.
private/var/folders/w0/r_snx5vx6y1c9vfwx1vzfbwh0000gn/T/ng-wNDsTu/angular-errors.log:
[error] TypeError: Cannot read property 'startTag' of undefined
at /Users/tt/Projects/App.Broker.Web/BrokerWeb/node_modules/ng-zorro-antd/schematics/utils/ng-update/elements.js:23:63
at Array.map (
@nishizhen we cannot reproduce this error, could you provide a repo for us to checks?
Maybe the problem is in the nz-dropdown
, nz-dropdown-button
, nz-form-extra
and nz-tooltip
, nz-popover
, nz-popconfirm
tags.
@nishizhen we cannot reproduce this error, could you provide a repo for us to checks? Maybe the problem is in the
nz-dropdown
,nz-dropdown-button
,nz-form-extra
andnz-tooltip
,nz-popover
,nz-popconfirm
tags.
Thx, we have resolved~
I got those issues when I was trying to upgrade to v9. All date-related components are not working. I did upgrade the date-fns to 2.x before the upgrade. Please Help!
@yourival
error TypeError: Cannot read property 'slice' of undefined at generateTheme ...
reinstall antd-theme-generator@1.2.2
ERROR TypeError: date_fns_addMonths_WEBPACK_IMPORTED_MODULE_0__default(...) is not a function ...
@wenqi73 can you check it?
@yourival Could you provide a mini reproduction?
@nishizhen we cannot reproduce this error, could you provide a repo for us to checks? Maybe the problem is in the
nz-dropdown
,nz-dropdown-button
,nz-form-extra
andnz-tooltip
,nz-popover
,nz-popconfirm
tags.Thx, we have resolved~
I also run into Cannot read property 'startTag' of undefined
, could you explain how you resolved it?
Found it, in our case we still had nz-form-explain
somewhere. I found it by replacing line 23 of node_modules/ng-zorro-antd/schematics/utils/ng-update/elements.js
with the snippet below, whilst running ng update ng-zorro-antd
.
return elements.map((element) => {
console.log(`element.nodeName ` + element.nodeName);
return element.sourceCodeLocation.startTag.startOffset;
});
I also run into Cannot read property 'startTag' of undefined, could you explain how you resolved it?
I downgraded my local install of NodeJS from 16 to 12, and I was able to run the ng-zorro-antd upgrade with:
cmd /C "set 'NG_DISABLE_VERSION_CHECK=1' && npx @angular/cli@9 update ng-zorro-antd@9.0.0 --force"
升级angular7-9遇到报错请问如何解决 ERROR in Error: Internal Error: The name total is already defined in scope to be [object Object]
中文版
Node.js
>=10.13
升级步骤
第一步 - 升级相关依赖
@angular/cdk
请执行ng update @angular/cdk
date-fns
请先升级到2.x
monaco-editor
请先升级到0.20.x
, 使用monaco-editor-webpack-plugin
时请将其升级到1.9.x
第二步 - 升级 NG-ZORRO
ng update ng-zorro-antd@9.x
常见问题
在
ng-zorro-antd@9.1.1
发布以前将@angular/cdk
降级到9.2.1
.English Version
Before upgrade
Node.js
>=10.13
.Upgrade dependencies
ng update @angular/cdk
, if you have used@angular/cdk
.date-fns
in your project, upgrade it to2.x
version, ref https://github.com/date-fns/date-fns-upgrade.monaco-editor
please upgrade it to0.20.x
, don't forget to upgrademonaco-editor-webpack-plugin
to1.9.x
if you have used it.Upgrade NG-ZORRO
ng update ng-zorro-antd@9.x
.Common Problem
Try downgrade
@angular/cdk
to 9.2.1 untilng-zorro-antd@9.1.1
released.