Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EEXIST: file already exists on ng build #15544

Closed
360disrupt opened this issue Sep 6, 2019 · 6 comments · Fixed by #15619
Closed

EEXIST: file already exists on ng build #15544

360disrupt opened this issue Sep 6, 2019 · 6 comments · Fixed by #15619
Labels
needs: more info Reporter must clarify the issue

Comments

@360disrupt
Copy link

🐞 Bug report

Command (mark with an x)

- [x] build

Is this a regression?

The problem occurred after updating angular and angular-cli (don't know the prev version).

Description

Angular-cli complains about an already existing file in the node_modules cache. The problem can be (temporarily) solved by deleting .cache with rm -rf node_modules/.cache but reoccurs one build later again.

🔬 Minimal Reproduction

  • ng build --prod --extra-webpack-config webpack.extra.js

The project is on:
https://github.com/grassberry-high/grow-frontend

🔥 Exception or Error



An unhandled exception occurred: EEXIST: file already exists, copyfile '/Users/user/Projekte/1-NODEJS/some-project/some-pi/frontend/node_modules/.cache/angular-build-dl/content-v2/sha512/36/86/afb82f76da09848c154ccb79a5213dc67698763412e526216fbce17a94bd0b1762da3627677b3ee97a05cdc837739fdc4dbdc08b13fbd50cbb0fb9a0b512' -> '/Users/user/Projekte/1-NODEJS/some-project/some-pi/frontend/dist/gh-frontend/runtime.24b02acc1f369d9b9f37.js'
See "/private/var/folders/q_/dr0933813977s5p6g5l754cc0000gn/T/ng-KwQpJ9/angular-errors.log" for further details.

angular-errors.log


    [error] Error: EEXIST: file already exists, copyfile '/Users/user/Projekte/1-NODEJS/some-project/some-pi/frontend/node_modules/.cache/angular-build-dl/content-v2/sha512/36/86/afb82f76da09848c154ccb79a5213dc67698763412e526216fbce17a94bd0b1762da3627677b3ee97a05cdc837739fdc4dbdc08b13fbd50cbb0fb9a0b512' -> '/Users/user/Projekte/1-NODEJS/some-project/some-pi/frontend/dist/gh-frontend/runtime.24b02acc1f369d9b9f37.js'
at Object.copyFileSync (fs.js:1743:3)
at SwitchMapSubscriber.rxjs_1.from.pipe.operators_1.switchMap [as project] (/Users/user/Projekte/1-NODEJS/some-project/some-pi/frontend/node_modules/@angular-devkit/build-angular/src/browser/index.js:332:28)

🌍 Your Environment


Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.803.0
@angular-devkit/build-angular     0.803.0
@angular-devkit/build-optimizer   0.803.0
@angular-devkit/build-webpack     0.803.0
@angular-devkit/core              8.3.0
@angular-devkit/schematics        8.3.0
@angular/cdk                      7.2.0
@angular/cli                      8.3.0
@angular/material                 7.2.0
@ngtools/webpack                  8.3.0
@schematics/angular               8.3.0
@schematics/update                0.803.0
rxjs                              6.5.2
typescript                        3.5.3
webpack                           4.39.2

Anything else relevant?

Mac OSX

@alan-agius4
Copy link
Collaborator

Hi, which Node version are you using? Can you try to update to @angular-devkit/build-angular 0.803.3?

@alan-agius4 alan-agius4 added the needs: more info Reporter must clarify the issue label Sep 6, 2019
@360disrupt
Copy link
Author

Node version: v11.15.0
Updated the package, but the error persists.

@alan-agius4
Copy link
Collaborator

Can you try to below steps please?

rm -rf dist
npm i @angular-devkit/[email protected] --save-dev
ng build --prod --extra-webpack-config webpack.extra.js

Thanks

@clydin
Copy link
Member

clydin commented Sep 9, 2019

Please be aware that Node.js v11 is EOL and is no longer supported. Can you try with v10.16.0+ or v12.0.0+? There is a known defect with file copying with MacOS on versions less than those.

@360disrupt
Copy link
Author

@alan-agius4 these steps trigger the same problem.
@clydin I'll try to upgrade everything the next days, I had some problems recently with upgrading/or I'll use a diff. node version for backend/frontend. I'll come back.

clydin added a commit to clydin/angular-cli that referenced this issue Sep 17, 2019
clydin added a commit to clydin/angular-cli that referenced this issue Sep 19, 2019
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: more info Reporter must clarify the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants