Category Archives: Uncategorized

Cannot use npm to install packages on windows

If you installed npm on windows and got to this issue

npm : File C:\Program Files\nodejs\npm.ps1 cannot be loaded because running scripts is disabled on this system. For
more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ npm install -g @angular/cli
+ ~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

One way to resolve this is to open powershell as administrator, then type the following command:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Rancher Desktop – Is the docker daemon running?

After I’ve uninstall Docker Desktop and installed Rancher Desktop, I had the following error:

ionut@home % docker ps -a
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

The way I’ve resolved this issue was to run the following command. Worked like a charm.

sudo ln -s ~$USER/.rd/docker.sock /var/run/docker.sock

How to fix grunt error “Cannot find module ‘lru-cache'”

To fix this error is very simple: you just have tot clean your node modules:

$ grunt install:development
Loading "Gruntfile.js" tasks...ERROR
>> Error: Cannot find module 'lru-cache'
Warning: Task "install:development" not found. Use --force to continue.

Aborted due to warnings.

john@C370012100004 /C/projects/nodejsp(develop)
$ rm -rf node_modules && npm cache clean && npm install