NG-ZORRO / ng-zorro-antd

Angular UI Component Library based on Ant Design
https://ng.ant.design
MIT License
8.87k stars 3.94k forks source link

搭建开发环境,运行npm run start出现错误 #5231

Closed xaclincoln closed 4 years ago

xaclincoln commented 4 years ago

Reproduction link

https://ng-zorro-antd-start.stackblitz.io

Steps to reproduce

git clone https://github.com/NG-ZORRO/ng-zorro-antd cd ng-zorro-antd npm install npm run start

What is expected?

不出现错误,网站能正确显示

What is actually happening?

运行npm run start之后,日志如下 gulp start:dev [16:24:32] Using gulpfile E:\angular\ng-zorro-antd\gulpfile.js [16:24:32] Starting 'start:dev'... [16:24:32] Starting 'clean'... [16:24:32] Finished 'clean' after 15 ms [16:24:32] Starting 'start:site'... [16:24:32] Starting 'init:site'... 🌈 Theme generated successfully. OutputFile: E:\angular\ng-zorro-antd\site\doc\assets\color.less [16:25:04] Finished 'init:site' after 32 s [16:25:04] Starting 'watch:site'... [16:25:04] Starting 'serve:site'...

chunk {main} main.js, main.js.map (main) 2.03 kB [initial] [rendered] chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 715 bytes [initial] [rendered] chunk {runtime} runtime.js, runtime.js.map (runtime) 6.15 kB [entry] [rendered] chunk {styles} styles.js, styles.js.map (styles) 2.29 MB [initial] [rendered] chunk {vendor} vendor.js, vendor.js.map (vendor) 339 kB [initial] [rendered] Date: 2020-05-08T08:25:35.355Z - Hash: 0efa04a99ae919c436b0 - Time: 22818ms

ERROR in Unable to write a reference to NzAffixComponent in E:/angular/ng-zorro-antd/components/affix/affix.component.ts from E:/angular/ng-zorro-antd/components/affix/affix.module.ts

Environment Info
operating system windows 10
node-js v12.14.1
ng-zorro-antd master
Browser chrome

上面的 stackblitz 链接没有什么作用,只是Issue的表单强制不能为空。尝试切换到9.1.0也出现同样的错误信息。

zorro-bot[bot] commented 4 years ago

Translation of this issue:

Development environment to build, run npm run start error

Reproduction link

[Https://ng-zorro-antd-start.stackblitz.io] (https://ng-zorro-antd-start.stackblitz.io)

Steps to reproduce

git clone https://github.com/NG-ZORRO/ng-zorro-antd cd ng-zorro-antd npm install npm run start

What is expected?

Without errors, the site can be displayed correctly

What is actually happening?

After running npm run start, log is as follows  gulp start: dev [16:24:32] Using gulpfile E: \ angular \ ng-zorro-antd \ gulpfile.js [16:24:32] Starting 'start: dev' ... [16:24:32] Starting 'clean' ... [16:24:32] Finished 'clean' after 15 ms [16:24:32] Starting 'start: site' ... [16:24:32] Starting 'init: site' ... 🌈 Theme generated successfully OutputFile:. E: \ angular \ ng-zorro-antd \ site \ doc \ assets \ color.less [16:25:04] Finished 'init: site' after 32 s [16:25:04] Starting 'watch: site' ... [16:25:04] Starting 'serve: site' ...

chunk {main} main.js, main.js.map (main) 2.03 kB [initial] [rendered] chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 715 bytes [initial] [rendered] chunk {runtime} runtime.js, runtime.js.map (runtime) 6.15 kB [entry] [rendered] chunk {styles} styles.js, styles.js.map (styles) 2.29 MB [initial] [rendered] chunk {vendor} vendor.js, vendor.js.map (vendor) 339 kB [initial] [rendered] Date: 2020-05-08T08: 25: 35.355Z - Hash: 0efa04a99ae919c436b0 - Time: 22818ms

ERROR in Unable to write a reference to NzAffixComponent in E: /angular/ng-zorro-antd/components/affix/affix.component.ts from E: / angular / ng-zorro-antd / components / affix / affix. module.ts

Environment Info
Operating system windows 10
Node-js v12.14.1
Ng-zorro-antd master
Browser chrome

The above link stackblitz no effect, only a form of forced Issue can not be empty. Try switching to 9.1.0 also made the same error message.

hsuanxyz commented 4 years ago

@wendellhu95 能用 Windows 试试吗?

iconfontmee commented 4 years ago

你们是在Linux 还是macOS

Eve-Sama commented 4 years ago

我这边win10 chrome, 刚刚重新clone, install, start, 没出现问题.

image

hsuanxyz commented 4 years ago

我这边win10 chrome, 刚刚重新clone, install, start, 没出现问题.

image

不用 git 的 shell 也可以吗?

xaclincoln commented 4 years ago

我重新使用git的shell尝试了下,也报同样的错误。

Eve-Sama commented 4 years ago

直接用cmd吗? 也可以跑的. 能够正常打开4200端口的zorro @hsuanxyz

xaclincoln commented 4 years ago

我在Ubuntu 18.04 LTS上试了下,可以正常运行。

wzhudev commented 4 years ago

@wendellhu95 能用 Windows 试试吗?

可以运行。

@xaclincoln 是不是安装了什么软件监视了文件操作?

wenqi73 commented 4 years ago

@xaclincoln 由于我们没有复现且该 issue 长期没有更新,这个 issue 将关闭。