You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am mostly sure this is a regression. When I was on "8 next", I could run build more than once (not sure which version the CLI was at the time). But, on "9 next", or just the current ng new, it seems to break.
Description
I just did an ng new command. Then, going into the project, if I run this twice in a row:
npm run build -- --prod
... it will work the first time. But, upon the second execution, I get the EEXIST error:
> ng build "--prod"
chunk {0} runtime-es2015.24b02acc1f369d9b9f37.js (runtime) 2.83 kB [entry] [rendered]
chunk {1} main-es2015.c1ca90f926552c3d2864.js (main) 369 kB [initial] [rendered]
chunk {2} polyfills-es2015.fd917e7c3ed57f282ee5.js (polyfills) 64.3 kB [initial] [rendered]
chunk {3} polyfills-es5-es2015.3aa54d3e5134f5b5b842.js (polyfills-es5) 223 kB [initial] [rendered]
chunk {4} styles.3ff695c00d717f2d2a11.css (styles) 0 bytes [initial] [rendered]
Date: 2019-08-31T10:44:47.301Z - Hash: ac5960e989c86bda1855 - Time: 16200ms
Generating ES5 bundles for differential loading...
An unhandled exception occurred: EEXIST: file already exists, copyfile '/Users/ben/Sites/bennadel.com/projects/breadboarding-poc-cli/node_modules/.cache/angular-build-dl/content-v2/sha512/36/86/afb82f76da09848c154ccb79a5213dc67698763412e526216fbce17a94bd0b1762da3627677b3ee97a05cdc837739fdc4dbdc08b13fbd50cbb0fb9a0b512' ->'/Users/ben/Sites/bennadel.com/projects/breadboarding-poc-cli/dist/breadboarding-poc-cli/runtime-es2015.24b02acc1f369d9b9f37.js'
See "/private/var/folders/49/h6_w8znd50vgwbbbwdxqsmlh0000gn/T/ng-c1s0RZ/angular-errors.log"for further details.
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR![email protected] build: `ng build "--prod"`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] build 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! /Users/ben/.npm/_logs/2019-08-31T10_44_47_385Z-debug.log
Note that if I remove the --prod, I can run multiple builds without issue. Also note that if I delete the node_modules/.cache folder, I can re-run the prod build.
🔬 Minimal Reproduction
Create a new project with the CLI, ng new test
Go into test, cd test
Run build with prod flag, npm run build -- --prod
Run build with prod flag npm run build -- --prod
The first build will work, the second build will break.
🔥 Exception or Error
ip-192-168-0-18:breadboarding-poc-cli ben$ npm run build -- --prod
> [email protected] build /Users/ben/Sites/bennadel.com/projects/breadboarding-poc-cli
> ng build "--prod"
chunk {0} runtime-es2015.24b02acc1f369d9b9f37.js (runtime) 2.83 kB [entry] [rendered]
chunk {1} main-es2015.c1ca90f926552c3d2864.js (main) 369 kB [initial] [rendered]
chunk {2} polyfills-es2015.fd917e7c3ed57f282ee5.js (polyfills) 64.3 kB [initial] [rendered]
chunk {3} polyfills-es5-es2015.3aa54d3e5134f5b5b842.js (polyfills-es5) 223 kB [initial] [rendered]
chunk {4} styles.3ff695c00d717f2d2a11.css (styles) 0 bytes [initial] [rendered]
Date: 2019-08-31T10:44:47.301Z - Hash: ac5960e989c86bda1855 - Time: 16200ms
Generating ES5 bundles for differential loading...
An unhandled exception occurred: EEXIST: file already exists, copyfile '/Users/ben/Sites/bennadel.com/projects/breadboarding-poc-cli/node_modules/.cache/angular-build-dl/content-v2/sha512/36/86/afb82f76da09848c154ccb79a5213dc67698763412e526216fbce17a94bd0b1762da3627677b3ee97a05cdc837739fdc4dbdc08b13fbd50cbb0fb9a0b512' -> '/Users/ben/Sites/bennadel.com/projects/breadboarding-poc-cli/dist/breadboarding-poc-cli/runtime-es2015.24b02acc1f369d9b9f37.js'
See "/private/var/folders/49/h6_w8znd50vgwbbbwdxqsmlh0000gn/T/ng-c1s0RZ/angular-errors.log" for further details.
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] build: `ng build "--prod"`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] build 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! /Users/ben/.npm/_logs/2019-08-31T10_44_47_385Z-debug.log
🐞 Bug report
Command (mark with an
x
)Is this a regression?
I am mostly sure this is a regression. When I was on "8 next", I could run build more than once (not sure which version the CLI was at the time). But, on "9 next", or just the current
ng new
, it seems to break.Description
I just did an
ng new
command. Then, going into the project, if I run this twice in a row:... it will work the first time. But, upon the second execution, I get the
EEXIST
error:Note that if I remove the
--prod
, I can run multiple builds without issue. Also note that if I delete thenode_modules/.cache
folder, I can re-run the prod build.🔬 Minimal Reproduction
ng new test
cd test
npm run build -- --prod
npm run build -- --prod
The first build will work, the second build will break.
🔥 Exception or Error
🌍 Your Environment
Anything else relevant?
No, I don't think so.
The text was updated successfully, but these errors were encountered: