Search code examples
ember.jsember-cli

Unable to use ember-cli without manually deleting "tmp" directory after every command


I am new to Ember and just installed the ember-cli:

npm install -g ember-cli

and it seems to install fine:

D:\>ember -v
ember-cli: 2.7.0
node: 4.4.5
os: win32 x64

When I repeat the identical version command (ember -v), I get the following error message:

D:\>ember -v
fs.js:794
  return binding.mkdir(pathModule._makeLong(path),
                 ^
Error: EEXIST: file already exists, mkdir 'D:\tmp'
    at Error (native)
    at Object.fs.mkdirSync (fs.js:794:18)
    at testCanSymlink (C:\Users\joeal_000\AppData\Roaming\npm\node_modules\ember-cli\node_modules\symlink-or-copy\index.js:18:6)
    at Object.<anonymous> (C:\Users\joeal_000\AppData\Roaming\npm\node_modules\ember-cli\node_modules\symlink-or-copy\index.js:9:15)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)

The first "ember -v" command creates a directory named "tmp" in directory that I am in when I issue the "ember" command. If I delete this "tmp" directory, everything works fine again:

D:\>rmdir /s tmp
tmp, Are you sure (Y/N)? y

D:\>ember -v
ember-cli: 2.7.0
node: 4.4.5
os: win32 x64

Here are my versions of node and npm:

D:\>node -v
v4.4.5

D:\>npm -v
2.15.5

How can I stop this behavior from occurring, whever I have to delete the "tmp" file after every ember command?

Thanks for the help.


Solution

  • ember-cli temporarily broken because of a dependent package.

    The issue was resolved a few minutes ago: https://github.com/broccolijs/node-symlink-or-copy/issues/26#event-746775676

    Just do npm install again after deleting your nodes_module directory.