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

Could not create _export folder: EEXIST: file already exists #68

Open
alvesvaren opened this issue Nov 22, 2022 · 12 comments · Fixed by #70
Open

Could not create _export folder: EEXIST: file already exists #68

alvesvaren opened this issue Nov 22, 2022 · 12 comments · Fixed by #70

Comments

@alvesvaren
Copy link

I've been using this with lost-pixel, and it gives me this error sometimes when I deploy to vercel and it uses the existing node_modules folder when reinstalling dependencies:

[14:52:43.956] [4/4] Building fresh packages...
[14:52:44.436] error /vercel/path0/node_modules/odiff-bin: Command failed.
[14:52:44.436] Exit code: 1
[14:52:44.437] Command: node ./postinstall.js
[14:52:44.437] Arguments: 
[14:52:44.437] Directory: /vercel/path0/node_modules/odiff-bin
[14:52:44.437] Output:
[14:52:44.437] Could not create _export folder
[14:52:44.438] error: Error: EEXIST: file already exists, mkdir '/vercel/path0/node_modules/odiff-bin/3'
[14:52:44.439] info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[14:52:52.090] Error: Command "yarn install" exited with 1
@dmtrKovalenko
Copy link
Owner

That's unfair! I'll take a look into that ASAp

@TrySound
Copy link

TrySound commented Nov 23, 2022

Hi, having the same in vercel deploy. Something in their env?

Installed by yarn 1

@dmtrKovalenko
Copy link
Owner

dmtrKovalenko commented Nov 23, 2022

The problem is in our install script which fails on fs exists.

What I can think of the following workaround – remove all the folders on preinstall script. E.g. preinstall: "rm -rf node-modules/odiff-bin"

@dmtrKovalenko
Copy link
Owner

I will work on several odiff fixes on thanksgiving weekends and will fix the issue

@TrySound
Copy link

Thanks!

@alvesvaren
Copy link
Author

The workaround of adding "preinstall": "rm -rf node_modules/odiff-bin" to the script-section of package.json works for me, thanks

@alvesvaren
Copy link
Author

alvesvaren commented Dec 8, 2022

I have upgraded to 2.5.1, but it still fails to install (exactly the same error).

I can replicate it locally by running
yarn followed by yarn upgrade odiff-bin in my project directory.

The folder node_modules/odiff-bin/3 seems to be deleted when running yarn, but then when it runs yarn upgrade it tries to create the same folder again.

Folder structure in my node_modules when it fails:
Screenshot_20221208_104623

It seems to fail once every other time I run yarn upgrade odiff-bin

@dmtrKovalenko dmtrKovalenko reopened this Dec 8, 2022
@nick-fields
Copy link

FWIW, I started seeing this today in our Netlify builds and once locally. We're using lost-pixel@3.2.0 (which uses odiff-bin@2.5.0) and have been for a few weeks before seeing this for the first time.

@dmtrKovalenko
Copy link
Owner

Need to revisit that one, workaround should help. Remove node_modules/odiff before you do npm install on CI

@nick-fields
Copy link

The preinstall script wasn't enough for us for some reason. We use yarn, so pinning the version to 2.5.1 via the resolutions feature has worked so far

@dmtrKovalenko
Copy link
Owner

It would be very helpful if you can create isolated repository specifically for your issue so I can debug it

@alvesvaren
Copy link
Author

alvesvaren commented May 3, 2023

I can replicate it by initializing an empty package with yarn init, running yarn add lost-pixel and then yarn upgrade odiff-bin. This causes the last command to fail every other time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants