I am trying to run Gulp 3.9.0 in my project folder and have downgraded my Gulp via npm install gulp#3.9.0. However, it seem like only my local version of gulp is 3.9.0. How do I get my CLI to the same version?
Related
i'm trying to connect mongodb with nodejs.But npm is not collaecting all dependencies in node_modules folder like bin and etc.
The node version I'm using v18.13.0
and npm version which is 8.19.3
i'am using mongodb community server version 6.0.4
i have tried all possiblities but npm install mongodb is not collecting all dependencies in node_modules folder. it's creating json file but not collecting bin and other dependencies in node_modules folder.
when i run code it's neither throw error nor run the code and cursor stucks.
I have the following folder structure with the locally installed Cypress module:
cypress-test-project
node_modules
cypress
tests.spec.js
As I read it in this article, npx helps to execute globally and locally installed packages:
Run a locally installed package easily
If you wish to execute a locally installed package, all you need to do
is type:
$ npx your-package
npx will check whether or
exists in $PATH, or in the local project binaries, and if
so it will execute it.
As I have Cypress installed in the node_modules folder, I tried to run the following command:
npx cypress open
This is what I get:
No version of Cypress is installed in:
C:\Users\main\AppData\Local\Cypress\Cache\9.5.1\Cypress
Please reinstall Cypress by running: cypress install
Cypress executable not found at:
C:\Users\main\AppData\Local\Cypress\Cache\9.5.1\Cypress\Cypress.exe
Platform: win32-x64 (10.0.22000) Cypress Version: 9.5.1
Why does npx stop after checking the PATH variable and not looking in the local folder?
Cypress always installs to that user-specific (global) location even if you install locally in the project.
It sounds like the install crashed part way.
Try removing and repeating.
I have expo-cli installed globally in node_modules. I created a React Native Project in which I also installed expo-cli locally (because its in the package.json dependencies of the project).
I noticed that whenever I run an expo-cli command in my project, the global expo-cli is the one always called. I know this because, I updated the local expo-cli to a newer version, and when I try to run a command that exists in the newer version and not the former, its says that the command is not recognized. Or when I run expo-cli -V it shows the version of the global expo-cli, not the newer version installed locally.
My question
How to force expo-cli commands to run with the locally installed version?
Add an npm script in your project's package.json for the expo command
"expo": "expo"
and use npm run expo ... to run you expo commands
In you project you can run npm bin / yarn bin to find the location of the locally installed binary files and invoke that directly.
./node_modules/.bin/expo ...
Just to give you some context.
I was running a project and after ng serve I was getting this warning message:
our global Angular CLI version (9.1.4) is greater than your local
version (1.0.0). The local Angular CLI version is used.
I googled and figured out I should update angular cli with the following command.
npm install --save -dev #angular/cli#latest
After that I am getting the following error when trying to build the project:
The build command requires to be run in an Angular project, but a project definition could not be found
Any help will be much appreciated.
After reading some issues reported on the GitHub repository, I found the solution.
In order to update the angular-cli package installed globally in your system, you need to run:
npm uninstall -g angular-cli
npm install -g #angular/cli#latest
Depending on your system, you may need to prefix the above commands with sudo.
Also, most likely you want to also update your local project version, because inside your project directory it will be selected with higher priority than the global one:
rm -rf node_modules
npm uninstall --save-dev angular-cli
npm install --save-dev #angular/cli#latest
npm install
After updating your CLI, you probably want to update your angular version too
Note: if you are updating to Angular CLI 6+ from an older version, you might need to read this
Edit: In addition, if you were still on a 1.x version of the cli, you need to convert your angular-cli.json to angular.json, which you can do with the following command:
ng update #angular/cli --from=1.7.4 --migrate-only
check here for more details.
I am having trouble with this error, my project need run angular/cli version 1.7.4 and Nodejs 6.10.3 .But the past I used angular cli version 6 and now I want to downgrade to angular cli 1.7.4 but I don't know how to downgrade angular cli version 6 at my global. I try to use npm uninstall -g #angular/cli and then I install the version I want by command npm install -g #angular/cli#1.7.4 but when I check ng -v it's still have a error in picture
P/S: I were updated my npm to latest version to make sure can remove angular cli version but still don't work
Keep your global package running at the highest version. If a project needs CLI 1.x, use the npm run commands instead.
Any npm commands run use the project's CLI, not your global version.