Skip to content

First time run of make.js leads to error "file already exists" #77

@ryandle

Description

@ryandle

This repros consistently for me (node 0.10.25) if you delete the build folder and run the following:

C:\Repos\Glimpse.Client>node make.js

fs.js:642
  return binding.mkdir(pathModule._makeLong(path),
                 ^
Error: EEXIST, file already exists 'C:\Repos\Glimpse.Client\build'
    at Object.fs.mkdirSync (fs.js:642:18)
    at C:\Repos\Glimpse.Client\make.js:46:24
    at Object.cb [as oncomplete] (fs.js:168:19)

Looks like a race in the use of fs.exists() && multiple calls to output() with the same value for outputDir.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions