ng-packagr: Angular build fails

Type of Issue

[X] Bug Report
[ ] Feature Request

Description

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'dist'
1 verbose cli ]
2 info using npm@6.14.13
3 info using node@v14.17.0
4 verbose run-script [ 'predist', 'dist', 'postdist' ]
5 info lifecycle bizdoc.core@1.4.3~predist: bizdoc.core@1.4.3
6 info lifecycle bizdoc.core@1.4.3~dist: bizdoc.core@1.4.3
7 verbose lifecycle bizdoc.core@1.4.3~dist: unsafe-perm in lifecycle true
8 verbose lifecycle bizdoc.core@1.4.3~dist: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;...
9 verbose lifecycle bizdoc.core@1.4.3~dist: CWD: C:\...\Angular\ClientApp
10 silly lifecycle bizdoc.core@1.4.3~dist: Args: [
10 silly lifecycle   '/d /s /c',
10 silly lifecycle   'npm run packagr && npm run copy-themes && npm run copy-assets && npm run publish'
10 silly lifecycle ]
11 silly lifecycle bizdoc.core@1.4.3~dist: Returned: code: 1  signal: null
12 info lifecycle bizdoc.core@1.4.3~dist: Failed to exec dist script
13 verbose stack Error: bizdoc.core@1.4.3 dist: `npm run packagr && npm run copy-themes && npm run copy-assets && npm run publish`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:376:20)
13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:376:20)
13 verbose stack     at maybeClose (internal/child_process.js:1055:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid bizdoc.core@1.4.3
15 verbose cwd C:\Users\barak\source\repos\BizDoc.Core\Angular\ClientApp
16 verbose Windows_NT 10.0.19042
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dist"
18 verbose node v14.17.0
19 verbose npm  v6.14.13
20 error code ELIFECYCLE
21 error errno 1
22 error bizdoc.core@1.4.3 dist: `npm run packagr && npm run copy-themes && npm run copy-assets && npm run publish`
22 error Exit status 1
23 error Failed at the bizdoc.core@1.4.3 dist script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

HowTo Reproduce

npm run packagr

Output “Compiling with Angular in legacy View Engine compilation mode.”

Produces Maximum call stack size exceeded.

Version Information

ng-packagr:            12.2.0-next.0
@angular/compiler:     12.1.4
rollup:                2.55.1
typescript:            4.3.5

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (7 by maintainers)

Most upvoted comments

I’ve reagraned my code as @SchnWalter suggested and used npm publish rather than calling ng-packagr directly and now it works!

Can you confirm you’re capacity in this forum?