Truffle installed but not working properly - blockchain

I'm using node version 12.20.2 and npm version 6.14.11 and installed truffle with cmd as administrator, the truffle framework version 5.5.12 has been installed but when I run any command in the vs code, it pops up with an error
PS E:\Testing (roughf work)> truffle version
truffle : File C:\Program Files\nodejs\truffle.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
+ truffle version
+ ~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
PS E:\Testing (roughf work)> truffle init
truffle : File C:\Program Files\nodejs\truffle.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
+ truffle init
+ ~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
I don't know what to do with this

On the truffle quickstart, it states to use nvm, as permission errors like this will occur. However, to solve this error, you can also use this powershell command Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Related

Error to write AWS configure in Visual Studio Code

When I write in Visual Studio Code AWS configure and press Enter, I get this error:
aws : The term 'aws' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
aws configure
What can I to solve this in Visual Studio Code?
CategoryInfo : ObjectNotFound: (aws:String) [], CommandNotFoundException
FullyQualifiedErrorId : CommandNotFoundException
Install the awscli
Then run the command:
aws configure

Hi My problem is with the terminal VS app

PS E:\learning\project\django\env\scripts> activate
activate : The term 'activate' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a
path was included, verify that the path is correct and try again.
At line:1 char:1
activate
+ CategoryInfo : ObjectNotFound: (activate:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Navigate to Venv environment and run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUse
then run:
.\\Scripts\Activate.ps1
this should activate your venv environment
to deactivate:
deactivate

Errors using AWSPowerShell in PowerShell

I am trying to work through the instructions on getting started with AWS IOT here. I have installed the prerequisites:
Windows 10
Visual Studio 2017 with latest updates
Windows Subsystem for Linux
But I think the page leaves some important things out. To use PowerShell I have to have some kind of AWSPowerShell or AWS Tools installed. When I run '.\provision_thing.ps1' it does some of the things but fails at Register-IOTThing and Get-IOTEndpoint. The errors I get are:
Register-IOTThing : The 'Register-IOTThing' command was found in the
module 'AWS.Tools.IoT', but the module could not be loaded. For more
information, run 'Import-Module AWS.Tools.IoT'. At
C:\Users\erics\source\repos\iot-dotnet-publisher-consumer\Dotnetsamples\provision_thing.ps1:44
char:1
Register-IOTThing `
+ CategoryInfo : ObjectNotFound: (Register-IOTThing:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
Get-IOTEndpoint : The 'Get-IOTEndpoint' command was found in the
module 'AWS.Tools.IoT', but the module could not be loaded. For more
information, run 'Import-Module AWS.Tools.IoT'. At
C:\Users\erics\source\repos\iot-dotnet-publisher-consumer\Dotnetsamples\provision_thing.ps1:48
char:17
$EndpointName = Get-IOTEndpoint
CategoryInfo : ObjectNotFound: (Get-IOTEndpoint:String) [], CommandNotFoundException
FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
When I try to run 'Import-Module AWS.Tools.IoT' as the error suggests I get:
Import-Module : The specified module 'AWSPowerShell' was not loaded
because no valid module file was found in any module directory. At
C:\Users\erics\source\repos\iot-dotnet-publisher-consumer\Dotnetsamples\provision_thing.ps1:1
char:1
Import-Module AWSPowerShell
CategoryInfo : ResourceUnavailable: (AWSPowerShell:String) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
If I attempt to install AWSPowerShell using Install-Module -Name AWSPowerShell I get a quite impressive and long error truncated here:
PS
C:\Users\erics\source\repos\iot-dotnet-publisher-consumer\Dotnetsamples>
Install-Module -Name AWSPowerShell
Untrusted repository You are installing the modules from an untrusted
repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are
you sure you want to install the modules from 'PSGallery'? [Y] Yes
[A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default
is "N"): A PackageManagement\Install-Package : The following commands
are already available on this system:'Add-ALXBContactWithAdd
ressBook,Add-ASInstances,Add-CTTag,Add-DPTags,Add-DSIpRoutes,Add-ELBTags,Add-EMRTag,Add-ESTag,Add-MLTag,Begin-RDSDTrans action,Build-LMBV2BotLocale,Clear-AWSCredentials,Clear-AWSDefaults,Commit-RDSDTransaction,Confirm-EC2EndpointConnection
,Confirm-EC2ReservedInstancesExchangeQuote,Confirm-EC2TransitGatewayPeeringAttachment,Confirm-EC2TransitGatewayVpcAttac
hment,Confirm-EC2VpcPeeringConnection,Dismount-ASInstances,Edit-EC2Hosts,Edit-RSClusterIamRoles,Enable-ORGAllFeatures,F
ind-CTEvents,Get-AG2ApiLis,Get-ASACases,Get-ASAccountLimits,Get-ASACommunications,Get-ASAServices,Get-ASASeverityLevels
,Get-ASATrustedAdvisorCheckRefreshStatuses,Get-ASATrustedAdvisorChecks,Get-ASATrustedAdvisorCheckSummaries,Get-ASLifecy
cleHooks,Get-ASLifecycleHookTypes,Get-AWSCredentials,Get-BATJobsList,Get-CDApplications,Get-CDDeployments,Get-CFCloudFr
ontOriginAccessIdentities,Get-CFDistributions,Get-CFGConfigRules,Get-CFGConfigurationRecorders,Get-CFGDeliveryChannels,
How can I clean this up and get access to AWSPowerShell in PowerShell?

Attempting to install AWS Elastic Beanstalk getting: ObjectNotFound: (C:\Users\Ameer:String) [], CommandNotFoundException

I'm following the instructions on the ELB github
I first run the following command :
git clone https://github.com/aws/aws-elastic-beanstalk-cli-setup.git
but I'm encountering the following error when I run the second command
.\aws-elastic-beanstalk-cli-setup\scripts\bundled_installer
I'm using windows 10 and running the commands through cmd, however powershell gives me the same issue.
The error:
C:\Users\Ameer : The term 'C:\Users\Ameer' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a
path was included, verify that the path is correct and try again.
At line:1 char:1
+ C:\Users\Ameer Rayan\Desktop\Blog_Project\aws-elastic-beanst ...
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Users\Ameer:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Exiting due to failure

Loopback Installation: "The term 'lb4' is not recognized"

I have installed the Loopbackjs and when I am trying to run lb4 command it is showing the error.
lb4: The term 'lb4' is not recognized as the name of a cmdlet,
> function, script file, or operable program. Check the spelling of the
> name, or if a path was included, verify that the path is correct and
> try again. At line:1 char:1
> + lb4 app
> + ~~~
> + CategoryInfo : ObjectNotFound: (lb4:String) [], CommandNotFoundException
> + FullyQualifiedErrorId : CommandNotFoundException
>
> lb4: The term 'lb4' is not recognized as the name of a cmdlet,
> function, script file, or operable program. Check the spelling of the
> name, or if a path was included, verify that the path is correct and
> try again. At line:1 char:1
> + lb4 app
> + ~~~
> + CategoryInfo : ObjectNotFound: (lb4:String) [], CommandNotFoundException
> + FullyQualifiedErrorId : CommandNotFoundException
The CLI tool lb4 is shipped in the npm package #loopback/cli. You need to install this package globally. See Getting Started:
STEP 2
Install LoopBack 4 CLI
The LoopBack 4 CLI is a command-line interface that can scaffold a project or extension. The CLI provides the fastest way to get started with a LoopBack 4 project that adheres to best practices.
$ npm install -g #loopback/cli
Blockquote
If you faced this kind of problem please make sure that npm is installed globally. and check also that node is properly insatlled.