Index file of cloned project isnt showing in localhost - javascript

I have cloned this github repository and i have it in my /var/www/html folder but when i go try to run the file in my browser i dont see anything
This is the link to the github repo I try to clone
https://github.com/pancakeswap/pancake-frontend
But when I go to /var/www/html/pancakeswap-frontent/public
I only see an empty site in my browser.
How do i properly clone this prject?
I also tried all version of npm run, npm run start npm run-script even with sudo but i cant run this file
What am i doing wrong?

Related

Nextjs-blog tutorial not loading on localhost:3000

Wanting to learn Nextjs and started by trying to go through the tutorial. Any time i 'npm run dev' local host just endlessly loads. When inspecting and checking the console I'm getting nothing at all.
Seems like nothing is coming back from the request.
Node version v16.13.1.
I've tried both npx create-next-app nextjs-blog --use-npm --example "https://github.com/vercel/next-learn/tree/master/basics/learn-starter" & npm init next-app nextjs-blog.
Any help with this will be appreciated. Thank you.
You need to actually start the process with npm run dev command from your terminal.
It worked for me
Delete the .next folder and try npm run dev command OR
Move the project to another folder location OR
Take back up of the code and delete the project and then run the same project again
You can try all of the above also

npx create-nuxt-app <project-name> not working

I want to create Nuxt.Js app using npx. But i am getting following error.
You have a space in your Windows username. This is a problem with NPX.
This is the path that NPM sees (which is right)
This is the path that NPX sees (which is wrong)
You can fix it by changing your NPM-Cache to another directory (without a space in the path):
npm config set cache C:\your\new\path\npm-cache --global
Source:
https://github.com/zkat/npx/issues/146#issuecomment-384016791
I changed npm-cache directory by writing following command
npm config set cache C:\tmp\nodejs\npm-cache --global
After that npx create-nuxt-app <project-name> worked perfectly.
I had it working using this command.
npm init nuxt-app <project-name>
This problem was resolved in a reddit
https://www.reddit.com/r/vuejs/comments/ie8vab/createnuxtapp_not_working_anyone_else_had_this/
Install it with:
npm i -g create-nuxt-app
Usually npm/npx should propose you to install, but it might not work
This issue can appear if during first try the installation was aborted
I have encountered similar problem and I have multiple spaces in the username.
If the above solutions does not work for you on Windows, there is another way.
Run VS code editor as an administrator.
Open the integrated terminal by clicking on Terminal > New Terminal or by pressing CTRL + SHIFT + '
Instead of using npx use the following
npm init nuxt-app project-name
Point number 3 will only work if you run the VS code editor as Administrator.
I am sure it is the same with external terminals. Run CMD/Gitbash as Administrator
Hope this helps. :D

npm install from a git repo leaves a pretty blank package?

I am using working from this github issue and it says to use a temporary github fork until a pull request is merged in another repo....cool.
I try to add the github fork to my project dependencies by doing this...
"reactstrap": "git+https://github.com/jameswomack/reactstrap.git",
in the package.json file and when I do a npm install everything goes according to plan, but then I get failures with my project not being able to find reactstrap...
When I go to inspect my node_modules I can see that the reactrap directory is pretty empty with only the LICENSE, README and package.json files...
What am I missing here?
The package.json file of the repository contains these lines:
"files": [
"LICENSE",
"README.md",
"CHANGELOG.md",
"lib",
"dist"
]
This is the list of files and directories to include in the npm package. As you can see, the actual JavaScript files will be located in the lib and dist directories.
The problem is that these directories are not checked into the Git repository, but created by a build, when you run npm run build.
A workaround that I would try: run the build, commit and push the generated files to your fork on GitHub. After that, installing the dependency the way you do it should give you the desired result.
However, if your goal is simply to test if your changes on a local fork of reactstrap work by including it as a dependency of a demo project, there is a better way: use npm link.
It works like this:
in the root of your local clone of your reactstrap fork, execute the command npm link
in the root of your demo project that uses reactstrap as dependency, execute the command npm link reactstrap
Any changes you then do to your reactstrap fork will be available in your demo project immediately.

meteor.js cant find module is-property when attempting to run cordova

Error image
I receive the error displayed above. I attempted into a different computer and it worked just fine. I have meteor,npm, is-property, and node installed and working properly. I have tried to manually install is-property many times.I have also tried to reinstall all the components but the module is-property still won't get detected from my computer. I run a windows 10.
locate this directory in your pc and
C:\Users\YOURUSERNAME\AppData\Local.meteor\packages\meteor-tool\1.3.4_1\mt-os.windows.x86_32\dev_bundle\lib\node_modules\cordova-lib\node_modules\npm\node_modules\request\node_modules\har-validator\node_modules\is-my-json-valid
Then run:
meteor npm install is-property
source
What i did was :
1- go to this path:
C:\Users\{USERNAME}\AppData\Local\.meteor\packages\meteor-tool\1.4.2_3\mt-os.windows.x86_32\dev_bundle\lib\node_modules\cordova-lib\node_modules\npm\node_modules\request\node_modules\har-validator\node_modules\is-my-json-valid\node_modules
2- the copy the path
3 - write this command :
subst x: C:\Users\{USERNAME}\AppData\Local\.meteor\packages\meteor-tool\1.4.2_3\mt-os.windows.x86_32\dev_bundle\lib\node_modules\cordova-lib\node_modules\npm\node_modules\request\node_modules\har-validator\node_modules\is-my-json-valid\node_modules
4- then I went to x:
5 - after that i was in my x i navigate to generate-object-property
6- in that folder run
npm install is-property
after that you can run your command in your project folder you should be fine

Bower: ENOGIT Git is not installed or not in the PATH

Git is installed and is in the path.
Platform: Red Hat Enterprise Linux 5.8.
>which git
/usr/local/bin/git
Yet bower can't find it:
bower angular#1.0.6 ENOGIT git is not installed or not in the PATH
What is the recommended work-around?
Adding Git to Windows 7/8/8.1 Path
Note: You must have msysgit installed on your machine. Also, the path to my Git installation is "C:\Program Files (x86)\Git". Yours might be different. Please check where yours is before continuing.
Open the Windows Environment Variables/Path Window.
Right-click on My Computer -> Properties
Click Advanced System Settings link from the left side column
Click Environment Variables in the bottom of the window
Then under System Variables look for the path variable and click edit
Add the pwd to Git's binary and cmd at the end of the string like this:
;%PROGRAMFILES(x86)%\Git\bin;%PROGRAMFILES(x86)%\Git\cmd
Now test it out in PowerShell. Type git and see if it recognizes the command.
Source: Adding Git to Windows 7 Path
Just use the Git Bash instead of cmd.
Run the following command at your node.js command prompt where "<git path>" is the path to your git bin folder:
set PATH=%PATH%;<git path>;
So, like this:
set PATH=%PATH%;C:\Program Files\Git\bin;
Or this: (Notice the (x86) )
set PATH=%PATH%;C:\Program Files (x86)\Git\bin;
This will add git to your path variables. Be sure you type it correctly or you could possibly delete your path vars which would be bad.
Make sure you installed Git with the second or third option selected from the list. It will penetrate the Git command to cmd by modifying PATH automatically ;)
I had the same error in Windows. Adding git to the path fixed the issue.
G:\Dropbox\Development\xampp\htdocs.penfolds.git\penfolds-atg-development>bower install
bower bootstrap#~3.0.0 ENOGIT git is not installed or not in the PATH
G:\>PATH
PATH=E:\Program Files\Windows Resource Kits\Tools\;
G:\Dropbox\Development\xampp\htdocs.penfolds.git\penfolds-atg-development>set PATH=%PATH%;E:\Program Files\Git\bin;
G:\Dropbox\Development\xampp\htdocs.penfolds.git\penfolds-atg-development>bower install
bower bootstrap#~3.0.0 not-cached git://github.com/twbs/bootstrap.git#~3.0.0
bower bootstrap#~3.0.0 resolve git://github.com/twbs/bootstrap.git#~3.0.0
I am also getting the same error and the solution is first to check if the Git is installed or not in the system and if not please install it.
After installation, open Git Bash or Git Shell from Windows and go to your project (same way you go in command prompt using "cd path"). Git Shell is installed by default with Github windows installation.
Then run the same bower install command. It will work as expected.
The below screenshot shows the command using Git Shell
On Windows, you can try to set the path at the command prompt:
set PATH=%PATH%;C:\Program Files\Git\bin;
When you ran the git install, you probably didn't choose:
"Use Git from the Windows Command Prompts"
during the installation.
Re-run git install, and choose that option.
You are missing the ENVIRONMENT PATH. Follow these steps:
Search for 'Edit the system environment variables'.
Click on 'Environment Variables'.
In the 'System variables' section, scroll down and click on the variable 'Path'. Click 'Edit'.
Append this text to the end of the 'Variable value'.
;%PROGRAMFILES%\Git\bin;%PROGRAMFILES%\Git\cmd
I also got the same problem from cmd and resolved using the following steps.
First install the https://msysgit.github.io/ (if not alredy installed).
Then set the Git path as suggested by skinneejoe:
set PATH=%PATH%;C:\Program Files\Git\bin;
Or this (notice the (x86)):
set PATH=%PATH%;C:\Program Files (x86)\Git\bin;
In Linux:
if you dont have installed git use:
sudo apt-get update
sudo apt-get install git
with command which git you will know the directory where is and then add in path if it is not in that enviroment variable.
I bumped into this problem on a cPanel CentOS 6 linux machine.
The solution for me was to symlink the cPanel git to /usr/local/bin/git
ln -s /usr/local/cpanel/3rdparty/bin/git /usr/local/bin/git
1.Set the Path of Git in environment variables.
2.From Windows command prompt,
run cd Project\folder\Path\
run the command: bower install
People above already gave solutions for your proplem, I hope so. If someone is facing this issue in 2022 in using docker images, then you should add a command to install git in your image.
For Example you are using alpine image in your Dockerfile. Then it will be something like this :
FROM node:8.3-alpine
# ....... other stuffs .....
RUN apk add git
# ....... other stuffs .....
I solved the problem by install Git Bash from Download Git Bash.
Setting this option 3 when installing the software as shown bellow.
Finally select the project folder by right click using Bash as shown below.
and type
npm install
. It works for me.
npm install from git bash did work for me.
After rebooting PC.
Just use the Git Bash instead of node.js or command prompt
As an Example for installing ReactJS, after opening Git Bash, execute the following command to install react:
bower install --react
I had the same problem and needed to restart the cmd - and the problem goes away.

Categories