wayne
wayne copied to clipboard
前端构建报错
$ make build-frontend-image
version: v1.8.6-67-ga140498
docker build --no-cache -t 360cloud/wayne-frontend:v1.8.6-67-ga140498 -f hack/build/frontend/Dockerfile .
Sending build context to Docker daemon 31.11MB
Step 1/7 : FROM 360cloud/wayne-ui-builder:v1.0.2 as frontend
---> 49fcfc1e7962
Step 2/7 : COPY src/frontend /workspace
---> 47bab08eaf70
Step 3/7 : RUN cd /workspace && npm run build:aot
---> Running in 7ad30cecc973
> [email protected] build:aot /workspace
> node --max_old_space_size=8000 ./node_modules/@angular/cli/bin/ng build --prod --aot
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
chunk {0} runtime.465c2333d355155ec5f3.js (runtime) 1.41 kB [entry] [rendered]
chunk {1} main.e9acf864a96eff893099.js (main) 128 bytes [initial] [rendered]
chunk {2} polyfills.0decb2a0ef37e520e094.js (polyfills) 130 bytes [initial] [rendered]
chunk {3} polyfills-es5.122ced6d88ba6a6b350b.js (polyfills-es5) 69.8 kB [initial] [rendered]
chunk {4} styles.0a34fe80ace344988981.css (styles) 425 kB [initial] [rendered]
chunk {scripts} scripts.de201845a2731569a1ce.js (scripts) 692 kB [entry] [rendered]
Date: 2020-07-09T10:20:37.603Z - Hash: e2c51a9fa5ba5532375c - Time: 41367ms
ERROR in Cannot read property 'loadChildren' of null
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build:aot: `node --max_old_space_size=8000 ./node_modules/@angular/cli/bin/ng build --prod --aot`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build:aot 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-07-09T10_20_37_755Z-debug.log
The command '/bin/sh -c cd /workspace && npm run build:aot' returned a non-zero code: 1
Makefile:48: recipe for target 'build-frontend-image' failed
make: *** [build-frontend-image] Error 1
本地构建同样错误,使用阿里云海外机器构建成功,应该是网络原因。