能否请您告诉我为什么在使用build
进行aot
时出现此错误。在没有aot
的情况下,Build可以正常工作。
C:\projects\Books>npm run build --prod
> books@0.0.0 build C:\projects\Books
> ng build --aot
Date: 2018-08-10T06:31:50.446Z
Hash: e0734627de059fdafc90
Time: 15810ms
chunk {main} main.js, main.js.map (main) 113 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 535 bytes [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 5.22 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 75.4 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 3.54 MB [initial] [rendered]
ERROR in multi ./src/polyfillngs.ts
Module not found: Error: Can't resolve 'C:\projects\Books\src\polyfillngs.ts' in 'C:\projects\Books'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! books@0.0.0 build: `ng build --aot`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the books@0.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
任何更新