How to fix: ENOENT: no such file or directory, rename … \abbrev (angular cli)

When I was running “npm install -g angular-cli”, I was getting the following error:

npm ERR! npm  v3.10.3                                                 

npm ERR! path C:\Users\Roel\AppData\Roaming\npm\node_modules\.staging\a

bbrev-69492d5e                                                        

npm ERR! code ENOENT                                                  

npm ERR! errno -4058                                                  

npm ERR! syscall rename                                               

npm ERR! enoent ENOENT: no such file or directory, rename ‘C:\Users\Roe

l\AppData\Roaming\npm\node_modules\.staging\abbrev-69492d5e’ -> ‘C:\Use

rs\Roel\AppData\Roaming\npm\node_modules\angular-cli\node_modules\ember

-cli\node_modules\npm\node_modules\abbrev’                            

npm ERR! enoent ENOENT: no such file or directory, rename ‘C:\Users\Roe

l\AppData\Roaming\npm\node_modules\.staging\abbrev-69492d5e’ -> ‘C:\Use

rs\Roel\AppData\Roaming\npm\node_modules\angular-cli\node_modules\ember

-cli\node_modules\npm\node_modules\abbrev’                            

npm ERR! enoent This is most likely not a problem with npm itself     

npm ERR! enoent and is related to npm not being able to find a file.  

npm ERR! enoent

npm ERR! Please include the following file with any support request:  

npm ERR!     C:\dev\angular2\npm-debug.log                            

npm ERR! code 1

My environment consisted of:

  • windows 10 64 bit
  • node v6.4.0
  • npm v3.10.3

This problem was also solved by @davidrensh solution:

npm uninstall -g angular-cli

npm install -g angular-cli

From <https://github.com/angular/angular-cli/issues/1190>

How to create an IIS application pool and web site on Windows 10 with PowerShell and Visual Studio Code

Tasks to create an IIS application pool and web site on Windows 10 with PowerShell and Visual Studio Code:

  • Install the Visual Studio Code plugin PowerShell 0.6.2
  • Create a file iis.configuration.ps1 in Visual Studio Code:

    # Note: When run with the Visual Studio Code PowerShell debugger, make sure you use the "x64" debugger,
    #       else you will get an error: New-WebAppPool : Cannot retrieve the dynamic parameters for the cmdlet.

    Import-Module WebAdministration

    # Create application pools
    New-WebAppPool -Name "myapp.localhost" -Force

    # Create websites
    New-Website -Name "myapp.localhost" -Port 80 -HostHeader "myapp.localhost" -ApplicationPool "myapp.localhost" -PhysicalPath "c:\projects\myapp\web" -Force

        • Create a launch.json in the same folder as the iis.configuration.ps1:

          {
              "version": "0.2.0",
               "configurations": [
                  {
                      "name": "PowerShell",
                      "type": "PowerShell",
                      "request": "launch",
                      "program": "${workspaceRoot}/iis.configuration.ps1",
                      "args": [],
                      "cwd": "${workspaceRoot}/iis.configuration.ps1"
                  },
                   {
                      "name": "PowerShell x86",
                      "type": "PowerShell x86",
                      "request": "launch",
                      "program": "${workspaceRoot}/iis.configuration.ps1",
                      "args": [],
                      "cwd": "${workspaceRoot}/iis.configuration.ps1"
                  }
              ]
          }

          Now you can debug / run the iis.configuration.ps1 file, by hitting F5, make sure you selected “PowerShell” and not “PowerShell x86” on the debug tab:

          image