Expo CLI not recognised - reactjs

im trying to create a new react-native app and to create it i need the expo CLI so i installed it via npm but then after trying to run expo init.... an error response occrured as the following:
expo : The term 'expo' 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
expo init _______
+ CategoryInfo : ObjectNotFound: (expo:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Would apperciate any help, Thanks.

If you could share additional screenshots that would be helpful.
One thing that is super easy to overlook is the path.
For example, you create a new folder "myApp"
Inside that folder you run npm install/expo init/etc.
What this does is creates another folder inside that one.
So your new path should be C://path/myApp/myApp
If you edit your question with screen shots/more info, then I can give a more detailed answer.

I had this issue before and here are some things to try:
install expo-cli globally (you dont explicitly state you've done this) npm i -g expo-cli
If you are using PowerShell and you are getting messages along the line of expo.ps1 cannot load because the execution of scripts is disabled on this system. you need to enable script execution. Decide on the script execution scope you want. Choices are Restricted (the current setting if you are getting this message), AllSigned, Unrestricted, and RemoteSigned (probably the one you want). Then open PowerShell as an admin and run
Set-ExecutionPolicy RemoteSign
Make sure npm is added to path (on Windows look for %USERPROFILE%\appData\Roaming\npm)
The classic uninstall, reboot, and reinstall

Related

How to install neo4j.bat

I am trying to install neo4j.bat using the cmd: neo4j.bat install service. I am following a tutorial on this so I can use BloodHound on my windows machine.
when running this command I am getting an Error:
AuthorizedManager check faild.
CategoryInfo : SecurityError: (:) [], ParentContainsErrorRecordException
FullyQualifiedErrorId : UnauthorizedAccess
Has anyone seen this or know how to get passed this.
Create a dummy folder anywhere C:\libraries and place bat file neo4j.bat in the created folder and add(append) the folder path C:\libraries\ to Path environment variable
For adding environment variable,
search for environment variable,
GO to User variables for YourAccountName, Select Path, Click Edit, Click on New > Paste C:\libraries\ without quotes > Click ok > Click ok
I ended up downloading a differnt version along with the desktop version. This seemed to work.

Firebase login error in VS code (with React app) because running scripts is disabled

I was trying to deploy my react app to with firebase and this happened after puting thhis command in the terminal: firebase login
firebase : File C:\Users\hp\AppData\Roaming\npm\firebase.ps1 cannot be loaded because running scripts is disabled on d because running scripts is disabled on
this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. .microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
firebase init
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
Use git bash terminal to solve this issue
Using "cd" command navigate to your project directory
Instead of "firebase login" use "firebase login --interactive" in the git bash terminal.
Also I found that if you open git bash terminal in vs code you will not have issues navigating the interactive server options.
In VSCode Editor Terminal Select "Git Bash", refer the screenshot
and enter the run the command there.

Installing Protractor for Angular JS in VScode

I have npm installed globally and installed protractor globally as well. When I check for the node version it returns proper version, but when I am trying to check the version of protractor after installing it gives me the below error. can anyone help me with whats going wrong here?
protractor : The term 'protractor' 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
+ protractor --version
You need to config the global protractor into PATH environment variable through
below two steps:
get npm global package install path by execute following cmd which will print out an absolute folder path.
npm config get prefix
add the install path/bin into PATH environment variable
For example the step 1 print out xxx\yyy, you should add xxx\yyy\bin; into PATH on Windows, Or add xxx\yyy\bin: on Linux.
Important: try protrator --version in new cmd window, Don't try again in previous opened cmd window.

'ng' is not recognized as an internal or external command, operable program or batch file. (Mean Stack)

Hello am currently writing a meanstack application, each time i run ng new client, it keeps reporting 'ng' is not recognized as an internal or external command,
operable program or batch file. Any idea what's the problem thanks.Note i already ran npm install #angular/cli so i just need to run ng new client to get on my way.I am running the command on the node.js command prompt.
Hello aready found an answer to my question, instead of running npm install #angular/cli just use npm install -g #angular/cli. Note the difference is that you need to install angular cli globally. thanks and hope anybody with same error finds luck.
If you are using Windows you can solve this problem editing the ".npmrc" adding this value: prefix=${APPDATA}\npm.
You can to find this file in "c:\Users\YOURUSERHERE". To view this file you need to display the hidden items.
After doing this, simply install the Angular and be happy.

Opendaylight (odl) ovs-vsctl not found error

I am following this tutorial: https://wiki.opendaylight.org/view/Getting_started
I am trying to use the following code in opendaylight using karaf
ovs-vsctl show
But the command window says Command not found: ovs-vsctl
I have installed all the necessary libraries and the local host server (http://localhost:8181/dlux/index.html) is running fine. But somehow odl can't find ovs.
Can anyone tell me what's the error? I am running win 8.
Thank you
You need to run this command outside of karaf terminal.
Firstly, you should have ovs(Open Virtual Switch) or Mininet installed, and then create one or two open switches.
Basically, you started the SDN controller in karaf, and now in the step you are encountering problem, the switches need to be assigned ODL controller as their manager.
You must check also that ovsdb is already installed in karaf.
For that, try to execute the next command:
feature:list | grep ovsdb
That command will display all the ovsdb components/features that are available in your karaf distribution. The third column will indicate you if a given component is already installed or not (if you see an X, that means that the component is installed). If you want to install a component/feature:
feature:install <name_of_the_feature>
After that, try to execute it outside of karaf, as Sidhant01 has indicated you before.
Try to do it with sudo:
sudo ovs-vsctl show.
If you want to configure ovsdb in an active mode:
tools-vm:~$ sudo ovs-vsctl set-manager tcp:127.0.0.1:6640
tools-vm:~$ sudo ovs-vsctl show
98d8cf7a-44b1-4b02-a60c-7d832409d06f
Manager "tcp:127.0.0.1:6640"
is_connected: true
ovs_version: "2.0.2"
Cheers

Resources