After "yarn global upgrade generator-jhipster", the version is 4.14.5 instead of latest version 5.3.4. why?
My node version is 8.11.1, yarn is 1.3.2.
2 possibilities:
when you run jhipster --version it prints local version (from local node_modules folder) if your are in a generated project, this enables projects to isolate from each others. In this case you must upgrade the project with jhipster upgrade
when you are not in a generated project, jhipster --version prints globally installed version and it probably means that you have installed jhipster twice (once with yarn and once with npm)
Usually the fix to double global installation is to uninstall from npm and yarn then reinstall with one or the other:
Remove from both yarn and npm
yarn global remove generator-jhipster
npm uninstall -g generator-jhipster
Install with just npm
npm install -g generator-jhipster
Since JHipster 5.3.0 npm is now the default client package manager, instead of Yarn.
Check version
jhipster --version
Using JHipster version installed globally
5.3.4
Right tick answer didn't work for me, which describe following steps:
yarn global remove generator-jhipster
npm uninstall -g generator-jhipster
npm install -g generator-jhipster
In my case I removed all mode modules & node itself, then fresh installation of jhipster worked for me.
Related
I am trying to install vue.js with no success, yet npm is up to date.
When I run vue init webpack vueapp I get this error:
No command 'vue' found, did you mean:Command 'vpe' from package 'texlive-latex-extra' (universe)
vue: command not found
I have already installed the cli using npm install vue-cli.
Thanks
Try to use npm install -g #vue/cli and then vue ui to start client in your browser.
You'll want to use npm install -g #vue/cli. Restart your terminal to make sure it shows up.
Also, make sure you have node 8.9+
From the docs:
Warning regarding Previous Versions
The package name changed from vue-cli to #vue/cli. If you have the previous vue-cli (1.x or 2.x) package installed globally, you need to uninstall it first with npm uninstall vue-cli -g or yarn global remove vue-cli.
Node Version Requirement
Vue CLI requires Node.js version 8.9 or above (8.11.0+ recommended). You can manage multiple versions of Node on the same machine with nvm or nvm-windows.
For me sudo helps to solve it.
Try to use this command in terminal:
sudo yarn global add #vue/cli
Then you can check the version and all will work correctly.
vue --version
Have you installed view?
Can you check vue --version
https://cli.vuejs.org/guide/installation.html
Try to use sudo npm install -g #vue/cli instead of npm install -g #vue/cli
You need to use sudo.
The vue-cli documentation at https://cli.vuejs.org/guide/installation.html states that:
To install the new package, use one of the following commands. You
need administrator privileges to execute these unless npm was
installed on your system through a Node.js version manager (e.g. n or
nvm).
npm install -g #vue/cli
# OR
yarn global add #vue/cli
Just run npm install -g pnpm for the missing packages.
Then you can run npm install -g #vue/cli
Now you can ckeck the vue --version
sudo npm install -g #aws-amplify/cli --unsafe-perm=true
It works for my situation.
C:\dev\myApp> ng serve -o
Your global Angular CLI version (6.0.8) is greater than your local version (1.0.2).
The local Angular CLI version is used.
To disable this warning use `"ng config -g cli.warnings.versionMismatch false"`
I don't know what to do with this.
I tried uninstalling angular/cli and npm cache clean but still have problems.
Anyone help me !
You have the old angular/cli package in your package.json
To update use:
npm r angular-cli
npm i #angular/cli#latest -D
Be aware though, if you have already been using the old cli for a long time, you might have to do some code migration. Especially when it comes to tests, polyfills and the angular config file.
You could try to create an empty angular project using the new cli, and compare the files which are created there, with the files you have in your own project, and update where applicable.
After that, when you have to update your cli again, you can use the new ng update command
You are using new project in older CLI you need to run this commands
npm uninstall --save-dev angular-cli
npm install --save-dev #angular/cli#latest
npm install
or you can try this approach
Updating npm :
Run [sudo] npm install -g npm (sudo is only required on Mac/ Linux)
Updating the CLI :
[sudo] npm uninstall -g angular-cli #angular/cli
npm cache clean
[sudo] npm install -g #angular/cli
i have try all command above but, it don't work. Maybe you can try this command for same probblem. it work for me.
ng update #angular/cli #angular/core
npm uninstall --save-dev angular-cli
npm install
if it still problem you can visit : https://angular.io/cli/update
and you can choice "Angular Update Guide" for specify version update from X to X
when I try to generate a project with vue-cli, its stopped, that is what i get
>> vue init webpack test
? Project name test
? Project description (A Vue.js project)
Then I cant cancel with ctl + c or something, I hit enter and nothing, im use node v8 and npm v5
I fixed this by first uninstalling the vue-cli by running npm uninstall vue-cli -g then uninstalling my Node.js from the control panel: Then installing the latest current version(not the LTS version) of Node.js then running npm install -g npm then install the vue-cli again using npm install -g vue-cli
In a nutshell update Node.js and npm to the latest versions then install the vue-cli.
Update: In case you use Ubuntu or any Ubuntu base OS:
First, uninstalling the vue-cli by running sudo npm uninstall vue-cli -g then uninstall your current version of Node and install the latest version from here (install the build tools as well) then run sudo npm install -g npm then install the vue-cli again using sudo npm install -g vue-cli
I have performed
npm install -g generator-jhipster
with and without sudo on my ubuntu machine but it keeps showing
Welcome to the JHipster Generator v3.3.0 and
JHipster update available: 3.8.0 (current: 3.3.0)
You could use the update command, or installing at the specific version.
npm update -g generator-jhipster
npm install -g generator-jhipster#3.8.0
https://docs.npmjs.com/cli/update
https://docs.npmjs.com/cli/install
Working now, I think a local copy was hiding global one
I did following
npm update generator-jhipster
npm install generator-jhipster#3.8.0
I have node 0.8.22 installed on my dev and production machines. I want to install a package for example gulp or grunt that is compatible with 0.8.22.
If I run the following npm attempts to install the latest gulp package and reports warnings because it requires node > 0.9.
npm install gulp -g
I know that I can run
npm view gulp versions
to get the version list and then use "npm install -g gulp#3.3.2" to get a particular version.
Is there away to do something like the following so I don't have to manually try each version until I get the compatible package?
npm install gulp#Latest_compatible -g
You can use npm-compat. Is easy to use, or you can implement your own way.