Angular 角度库的间歇性NPM构建错误-eNONT:没有此类文件或目录,chmod';dist/acme/library/bundles/acme library.umd.min.js.map';

Angular 角度库的间歇性NPM构建错误-eNONT:没有此类文件或目录,chmod';dist/acme/library/bundles/acme library.umd.min.js.map';,angular,npm,build,angular-cli-v8,Angular,Npm,Build,Angular Cli V8,我们有一组angular库,我们在构建服务器中构建并发布到artifactory 间歇性地(如50次构建中的1次),构建失败并出现以下错误。 enoint:没有这样的文件或目录,chmod'dist/acme/library/bundles/acme library.umd.min.js.map' 这完全是随机发生的。我们为产品内置的所有构建包括C库、Java项目、Angular项目等。整个源代码都是从Perforce签出的,源代码是在NFS挂载目录中签出的,每个构建都可以通过NFS挂载目录使用

我们有一组angular库,我们在构建服务器中构建并发布到artifactory

间歇性地(如50次构建中的1次),构建失败并出现以下错误。
enoint:没有这样的文件或目录,chmod'dist/acme/library/bundles/acme library.umd.min.js.map'

这完全是随机发生的。我们为产品内置的所有构建包括C库、Java项目、Angular项目等。整个源代码都是从Perforce签出的,源代码是在NFS挂载目录中签出的,每个构建都可以通过NFS挂载目录使用checkedout source和build out

如果有人能提出为什么会发生下面这样的错误,那将是非常有帮助的?它似乎在抱怨一个本应在ng构建过程中刚刚创建的文件

Building Angular Package
Building entry point '@acme/library'
Cleaning build directory
Rendering Stylesheets
Rendering Templates
Compiling TypeScript sources through ngc
Bundling to FESM15
'QueryList' is imported from external module '@angular/core' but never used
'ClrWizard' is imported from external module '@clr/angular' but never used
Bundling to FESM5
Bundling to UMD
No name was provided for external module '@clr/angular' in options.globals ??? guessing 'angular'
Minifying UMD bundle
WARN: Side effects in initialization of unused variable Mb [0:745,12]
WARN: Dropping duplicated definition of variable Lc [0:1101,24]
WARN: Dropping duplicated definition of variable Mc [0:1102,24]
WARN: Dropping duplicated definition of variable Nc [0:1103,29]
WARN: Side effects in initialization of unused variable Ie [0:1647,12]
Relocating source maps
Copying staged files

BUILD ERROR
ENOENT: no such file or directory, chmod 'dist/acme/library/bundles/acme-library.umd.min.js.map'
Error: ENOENT: no such file or directory, chmod 'dist/acme/library/bundles/acme-library.umd.min.js.map'

An unhandled exception occurred: ENOENT: no such file or directory, chmod 'dist/acme/library/bundles/acme-library.umd.min.js.map'
See "/tmp/ng-Hje1zE/angular-errors.log" for further details.
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! @acme/acme-ui@0.0.1-SNAPSHOT.12345 build:acme:feature:library: `ng build acme-library`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the @acme/acme-ui@0.0.1-SNAPSHOT.12345 build:acme:feature:library 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!     /root/.npm/_logs/2020-03-24T21_30_49_058Z-debug.log



您是否尝试禁用Ivy?我们没有使用ivyIt听起来很像NFS缓存了它的状态,并且在“重新定位源映射”步骤后没有使其无效。例如,这里的人似乎描述了类似的症状:同意@amakhrov的说法,npm在安装/构建过程中确实会对磁盘进行重击,因此尝试在NFS装载中执行此操作不太可能奏效。