I am having issues utilizing NPM commands - npm-install

Im currently trying to make a functional log in system for a company website.
This is the video im using for reference: https://www.youtube.com/watch?v=-RCnNyD0L-s&t=149s
I am unable to get NPM to work for me. i installed node.js and i installed npm by microsoft im now stuck, none of the commands are working for me.

Related

is there any standalone installer for NPM windows?

Is there standalone setup installer for NPM windows?
The purpose is to install NPM without using internet connection
Installing NPM or Node.js requires an Internet connection. Even using cmd to install it, They download the files first in the background from the node.js website. Then, installing it. Or you can download it from the Node.js Official website.
Edit: Yeah there is but you still need to download it online.

Error: option 'name' clashes with existing property 'name' on Command

Some context: I've recently been trying to update a react native project that uses expo, since I have not worked on the project for about four months. I believe I finally was able to successfully upgrade the project as expo is starting. The issue is that I am now having some trouble with some of the newer modules I just installed with npm. This error seems to be coming from me not knowing how to use the commander module. Additionally, I do not believe that I have a thorough understanding of modulues in react native/expo. I am using ubuntu 20.04 via windows terminal.
Error:
I did go to the website mentioned in the error. I believe that this link - https://github.com/tj/commander.js#avoiding-option-name-clashes - is what will solve my problem. However, I am confused as to where I should put the example file and how to use it.
I am not very well versed in modules for react native/expo and it is quite possible that I do not need to use this module (I thought that installing it would make my react native program run, but that does not seem to be the case).
Thus, I am looking for advice on either how to use this module, or on whether or not I should be using these modules (after updating node and then expo, the following modules could not be found every time I ran npm start, so I decided to install them using sudo npm install module_name -g since some other stackoverflow/github pages recommended that):
fs-extra
terminal-link
chalk
getenv
commander
#expo/xdl
Any help would be appreciated, and I would be happy to provide any more information that would be relevant.
I was not able to figure out a way to make the project work with the above modules. So, I followed the advice of a post I made on the expo forums (I posted similar context there and also the answer that I wrote below).
If you do not want to click the link, here are the steps below:
Basically, I uninstalled expo using the following command: npm -g uninstall expo-cli --save && yarn global remove expo-cli. Then I proceeded to remove the .expo folder from my home directory. More details on these two steps can be found here.
After that, I reinstalled expo using npm install --global expo-cli, from the expo documentation, in the install section.
Then I closed my terminal, reopened it, and ran expo whoami. The command returned recommending an update, so I followed the provided update command (which I believe was just npm install --global expo-cli again).
I closed the terminal, reopened it, and ran expo whoami again. This time I was just met with "you are not logged into expo" (or something along those lines). So, everything seemed up to date.
I then went to project and ran npm start and it worked fine.
Note: You may need to use sudo for any uninstall and install commands above (your terminal will likely tell you if you do).
Note Clearing cache for npm and yarn may take some time. Additionally, the first time you run npm start may also take some time. I'd say all in all this took about two to three hours, but my computer is also not the best.

while installing cypress through command :npm install cypress --save-dev getting error as The Cypress App could not be downloaded

while installing cypress through command :npm install cypress --save-dev getting error as The Cypress App could not be downloaded.
Error :
Finishing Installation
The Cypress App could not be downloaded.
Does your workplace require a proxy to be used to access the Internet? If so, you must configure the HTTP_PROXY environment variable before downloading Cypress. Read more: https://on.cypress.io/proxy-configuration
Otherwise, please check network connectivity and try again:
But please not I m not using any proxy and on my personal wifi.
plz suggest ,what can be done in this case.Thanks
It seems to be too many possible reasons for this issue in general but I managed to find a workaround to install Cypress from within a corporation with npm and without using sudo npm or turning off strict ssl.
The following worked for me per November 18th 2020 with Ubuntu 18.04 and npm 6.14.8:
I downloaded the zip file shown in https://docs.cypress.io/guides/getting-started/installing-cypress.html#Direct-download
I installed cypress as shown in https://docs.cypress.io/guides/getting-started/installing-cypress.html#Install-binary : CYPRESS_INSTALL_BINARY=~/Downloads/cypress.zip npm install cypress --save-dev
I could now run npx cypress open to start the gui (which will also generate the cypress.json file)
Possible Reasons for this issue:
U might be running the project with a proxy setting.
One of the reason could be you are behind the firewall.that may prohibit your network? Please follow the guidelines in Proxy Configuration if so(https://docs.cypress.io/guides/references/proxy-configuration.html#Set-a-proxy-on-Linux-or-macOS).
make sure you have right access to install the cypress.
if none of the above mentioned reasons try removing the biraries or node_modules and install again.

Issues with installing sqlite3 in NPM

So I'm just setting up my Discord bot in a new machine. I used the latest Node version in LTS and I have Windows Build Tools installed.
But doing npm install, everything is going well until the part when the sqlite3 package is being installed. I have a log here for reference: https://pastebin.com/ktJ8VyZY
And another log straight from PowerShell: https://pastebin.com/d232rjJY
Before I had issues with Python and that has been resolved but right now I cannot pinpoint exactly what is the problem and I've been reading all lines related to gyp and the problem isn't really clear for me so I'm here if anyone can pinpoint the exact problem and the ways to solve it.
Thank you.
Package.json if needed: https://pastebin.com/ACh0mQRe

npm package installation error (express, ember)

I've been trying to install ember and express in my windows 8.1 for learning. I face the similar error in both packages ember and express while using the following command.
npm install -g express-generator
I have attached the cmd error page for better understanding of the error. I am new to express and ember, just now starting to learn please help me out.
thanks.image here
Open and admin command line (Run as administrator) then and execute your commands.
You need elevated permissions to install globally (-g), that's the cause of your errors.