Friday, 10 November 2017

Troubleshooting Angular CLI and Windows search indexing

I recently installed Node.js and Angular on my machine for some explorations. During the creation of my first test app using the Angular CLI I came across an annoying issue. I wanted to create a new project using the command
ng new my-demo-app
The following error occured:
30969 verbose unlock done using C:\Users\testuser\AppData\Roaming\npm-cache\_locks\staging-9ee6130cb5906a84.lock for D:\angular\my-demo-app\node_modules\.staging
30970 verbose stack Error: EPERM: operation not permitted, scandir 'd:\angular\my-demo-app\node_modules\fsevents\node_modules\getpass\node_modules'
30971 verbose cwd D:\angular\my-demo-app
30972 verbose Windows_NT 6.1.7601
30973 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "--quiet" "install"
30974 verbose node v8.9.1
30975 verbose npm  v5.5.1
30976 error path D:\angular\my-demo-app\node_modules\fsevents\node_modules\getpass\node_modules
30977 error code EPERM
30978 error errno -4048
30979 error syscall scandir
30980 error Error: EPERM: operation not permitted, scandir 'D:\angular\my-demo-app\node_modules\fsevents\node_modules\getpass\node_modules'
30980 error  { Error: EPERM: operation not permitted, scandir 'D:\angular\my-demo-app\node_modules\fsevents\node_modules\getpass\node_modules'
30980 error   stack: 'Error: EPERM: operation not permitted, scandir \'D:\\angular\\my-demo-app\\node_modules\\fsevents\\node_modules\\getpass\\node_modules\'',
30980 error   errno: -4048,
30980 error   code: 'EPERM',
30980 error   syscall: 'scandir',
30980 error   path: 'D:\\angular\\my-demo-app\\node_modules\\fsevents\\node_modules\\getpass\\node_modules' }
30981 error Please try running this command again as root/Administrator.
30982 verbose exit [ -4048, true ] 
Error -4048 seems to occur a lot and most of the time it is a permission issue. I first thought it has to do with some access issue of my user but after lot's of googling and trial and error I found an helpful hint in this forum: https://groups.google.com/forum/#!topic/angular/0iFLX6dEdeA User norricorp gave a hint that this could be related to windows search indexing. During the app-creation files and folders are newly created and then moved to other places. Windows indexing can interrupt this process as it keeps files to be (re-)moved open , so the whole process does not work properly. Once I disabled the windows indexing service the command worked properly :-)

Friday, 17 February 2017

Quick tip: moving an Eclipse project to another folder

I am restructuring some projects on my local machine. Usually I don't want to touch a running project but since I have the opportunity to use an internal Bitbucket server now at my workplace I also want to have all my local project source files on one location.
So this is how I moved the project source files to another location on my local machine:
  1. Open Eclipse and go to the Package Explorer view
  2. Check your project folder locations

    So the project is located in the folder D:\sample\net.mruhnau.sample.hello
  3. Right-click on the projec in the Package Explorer and choose Refactor --> Move...
  4. In the following dialog, choose the new folder location for the project and click OK.
This is it, Eclipse moves the files to the specified location. The advantage is that using this procedure will retain your workingsets as well as project information, history etc. I think this is a very smooth way of reorganizing project files.

Thursday, 16 February 2017

VOP: Mail database is not ready

We have been running an IBM Verse on Premise (VOP) pilot in our company for quite some time now. We started last year with the beta version of IBM Verse and upgraded toi the Gold version a couple of weeks ag. After the upgrade, I had an issue opening my inbox. The following error message occured:


Checking the underlying REST calls brought up this:
The REST call to retrieve the inbox returned an error "Mail database is not ready":
{"error" :
   {
       "failure" : "Database upgrade required",
        "message": "Mail database is not ready"
    }
}

The IBM Verse On-Premises 1.0 Administrator Documentation clarifies the required steps to prepare a mail file for VOP. Besides some new views, VOP also requires that Folder references are enabled for the mail file. A convert -m task rsolved the issue quickly for me.

So the steps to prepare a mail file for VOP are:
  • add additional views
  • enable full text index
  • enable folder references
 Thank you, Christian for your support on resolving the issue :-)