Error add @angular/pwa

i want to upload my pwa to my server.
I wanted to do ng add @angular/pwa
and I get the error
ng: Unable to load file C:\Users\ludo\AppData\Roaming\npm\ng.ps1, because script execution is disabled
on this system. For more information, see about_Execution_Policies at
At character Line: 1: 1

  • ng add @ angular / pwa
  • ~~
    • CategoryInfo: Security error: (:slight_smile: , PSSecurityException
    • FullyQualifiedErrorId: UnauthorizedAccess

How to solve this problem?
Thank you in advance.

I’m confused by the fact that you say you want to upload something, yet then describe a command that is intended to change the build process. Ordinarily, the place you serve a PWA from is not the same place you build it.

So, let’s say alice is the name of the host you are using for your development work on, and barbara is the host where your PWA will be deployed from.

The first question is “are you trying to run that ng add command on alice or barbara?”. If alice, then personally I would recommend introducing alice to Linux. Presumably you’re not going to be particularly responsive to that suggestion, so I guess you’ll need to wade through that Microsoft documentation that is included in your error message. It looks pretty comprehensive and relevant to your situation.

If you’re trying to run ng add on barbara, that’s weird. I would recommend not doing that, and instead running all build-related commands on alice instead. I suppose this advice applies as well in the case where alice and barbara are the same machine: separate them and concentrate on the build environment, not the hosting environment.

bin i finished developing my pwa locally so now i need to install @ angular / pwa then build app in locally before uploading to my online server.
that’s it, isn’t it?