0
votes

I'm meant to be maintaining an Ionic app, but I cannot install Ionic on any of my machines (neither at work - Win 7) nor at home (Win 10).

Perhaps we could start with my home machine (Win 10). After the fail, I uninstalled Node completely, and restarted the machine. I re-installed Nodejs and upgraded npm such that the versions are: Nodejs: 10.4.1 NPM: 6.1.0

The output from my Powershell prompt (at elevated privileges) is:

PS F:\Code\Powershell\Toolkit> npm install -g ionic npm ERR! path C:\Users\roger\AppData\Roaming\npm\node_modules\ionic\node_modules.readable-stream.DELETE npm ERR! code ENOTEMPTY npm ERR! errno -4051 npm ERR! syscall rmdir npm ERR! ENOTEMPTY: directory not empty, rmdir 'C:\Users\roger\AppData\Roaming\npm\node_modules\ionic\node_modules.readable-stream.DELETE'

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\roger\AppData\Roaming\npm-cache_logs\2018-06-17T01_32_39_358Z-debug.log

Interestingly, the directory .readable-stream.DELETE referred to as being not empty, is empty. So, not sure what is going on there.

Any help would be great. Thanks

1
use node -v 8 npm for nodejs version 10 is yet not supported - manAbl
I uninstalled 10, installed v8.11.3 I'm getting the same error. Even after a restart. - onefootswill
Whenever you trouble with the file system (directory not getting emptied quickly enough in this case), be sure to disable the installed anti-malware product and try again. - Hans Passant
I cannot, for the life of me, delete the .readable-stream.DELETE directory. That seems to be the problem. I've tried all sorts of flags like -recurse -force and even tried to shorten the path using the good old subst comment. It will not be deleted. - onefootswill

1 Answers

1
votes

First thing to do is sort out that directory deletion issue. Make sure you uninstall Nodejs to make sure none of its processes are locking that directory.

Try the following.

  1. Right-click the drive upon which that directory is located (probably C drive).
  2. Click Properties on the Context Menu
  3. Go to the Tools tab
  4. Click the Check button.

Let it run its course. Once complete, if all looks well, try deleting the directory again.

If that succeeded, install Node again (v8.11.3). Don't upgrade NPM.
Install Ionic again with npm install -g ionic
Create an app ionic start myApp tabs
Change to the myApp directory.
Run ionic serve

Hopefully the first part will clear away that folder and get you on your way.