Issue with Jhipster upgrade from 4.5.2 to 4.14.1 - jhipster

We are trying to upgrade our jhipster application to the latest version.
We are trying to upgrade manually as referred in the page [http://www.jhipster.tech/2018/02/27/jhipster-release-4.14.1.html][1]
currently our Jhipster version is 4.5.2
after executing the command
yarn global upgrade generator-jhipster
following is the output:
yarn global upgrade generator-jhipster
yarn global v1.5.1
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Rebuilding all packages...
info Lockfile not saved, no dependencies.
success Saved 0 new dependencies.
Done in 0.11s.
now if I check the Jhipster version it still shows 4.5.2
we want to upgrade to Jhipster 4.14.1
Other Version we use:
node version -> v8.9.4
npm version -> 5.6.0
yarn version -> 1.5.1
What is going wrong in our upgrade steps that we do?

It seems that you actually did not fully follow the release note.
Have you executed the second command ?
jhipster upgrade
EDIT:
If you follow the manual way to update, then have you follow this instruction ?
If you have an existing project, it will still use the JHipster
version with which it was generated. To upgrade your project, you must
first delete its node_modules folder and then run:
jhipster

Related

node 19 hangs when installing Realm

I am trying to install realm in a fresh react-native project. but when I run this command yarn add realm or npm I realm it always stop on this step.
[4/4] ๐Ÿ”จ Building fresh packages...
[1/1] โ „ realm
and nothing is happening. I have tried many version to install but same issue,
As #engr-aftab-ufaq said, installing nvm and then using the latest LTS version (v18.14.0 as I'm writing), then re-running npm install realm, fixed the problem for me
For node 19, you can try this
npm install --save realm#11.4.0
Please check for compatibility with you node and react native version: https://github.com/realm/realm-js/blob/master/COMPATIBILITY.md

Looking for fix

npx create-react-app online exam
npx: installed 98 in 34.58s
Creating a new React app in /home/oem/online.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
yarn add v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
error #typescript-eslint/eslint-plugin#2.24.0: The engine "node" is incompatible with this module. Expected version "^8.10.0 || ^10.13.0 || >=11.10.1". Got "11.0.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Aborting installation.
my node version-: node -v
v14.8.0
my npm version-: npm -v
6.14.8
The #typescript-eslint/eslint-plugin package only supports Active LTS and Maintenance LTS of Node releases. You are using the Node version of v14.8.0 which is not an LTS version.
According to #typescript-eslint/eslint-plugin docs
This project makes an effort to support Active LTS and Maintenance LTS release statuses of Node according to Node's release document. Support for specific Current status releases are considered periodically.
More information about Node's release can be found here. Try switching an LTS version of the Node. The latest LTS versions can be found here.

angular can't update because of typescript dependencies

Here is my ionic info:
Ionic CLI : 6.2.1 (C:\Users\Arashsoft\AppData\Roaming\npm\node_modules\#ionic\cli)
Ionic Framework : #ionic/angular 5.0.5
#angular-devkit/build-angular : 0.803.25
#angular-devkit/schematics : 8.3.25
#angular/cli : 9.0.6
I want to update #angular-devkit/build-angular but get these errors:
Firstly, I got these errors after running ng update #angular/core:
Repository is not clean. Please commit or stash any changes before updating.
Then i tried again using this command:
ng update #angular/cli #angular/core --allow-dirty
and then got these errors:
Package "#angular-devkit/build-angular" has an incompatible peer dependency to "typescript" (requires ">=3.1 < 3.6", would install "3.7.5").
ร— Migration failed: Incompatible peer dependencies found.
Peer dependency warnings when installing dependencies means that those dependencies might not work correctly together.
You can use the '--force' option to ignore incompatible peer dependencies and instead address these warnings later.
See "C:\Users\ARASHS~1\AppData\Local\Temp\ng-zWLLPl\angular-errors.log" for further details.
How can I fix it?
Ionic doesn't seem to support Angular 9 yet, it'd probably be better to wait until official support arrives.
If you still want to try it Angular has a dedicated upgrade page where you can follow the procedure. In a nutshell:
You update #angular/cli and #angular/core to the latest 8.x.x Version
You update #angular/cli and #angular/core to the latest 9.x.x Version, ignoring peer dependency problems with --force might be necessary temporarily
After that you can update the other Angular related dependencies via ng update
Once all your dependencies are up-to-date the error message should go away
As for 1) your git repo needs to be clean because Angular doesn't want to mess with your local changes, you've probably changed some files, you can see what changed with a git client like Sourcetree or simply by using the command line git status which will print what files have changed.
Regarding 2) I wouldn't recommend using --allow-dirty, always try to get a clean git state and then do the upgrade.
If you're new to git I strongly recommend reading up on the docs
Hope this helps, happy coding!

I am getting various warrnings and errors when trying to create react app with npx

I am trying to create react app with npx and get the following error: error fork-ts-checker-webpack-plugin#1.5.0: The engine "yarn" is incompatible with this module. Expected version ">=1.0.0".
Any ideas what could be the source of the issue? any tips would be appreciated. Thanks!
npx create-react-app food
npx: installed 91 in 5.566s
Creating a new React app in /home/oren/m/code/food.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
yarn add v0.16.1
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents#1.2.9: The platform "linux" is incompatible with this module.
info "fsevents#1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
warning fsevents#2.0.7: The platform "linux" is incompatible with this module.
info "fsevents#2.0.7" is an optional dependency and failed compatibility check. Excluding it from installation.
error fork-ts-checker-webpack-plugin#1.5.0: The engine "yarn" is incompatible with this module. Expected version ">=1.0.0".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Aborting installation.
yarnpkg add --exact react react-dom react-scripts --cwd /home/oren/m/code/food has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Deleting food/ from /home/oren/m/code
Done.
About my environment:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
$ uname -a
Linux oren 4.4.0-142-generic #168-Ubuntu SMP Wed Jan 16 21:00:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
node -v
v12.8.0
npm -v
6.10.2
I have solved by installing latest version of Yarn.
- first uninstall version
- installed latest version npm install -g yarn
- removing yarn cache folder in the AppData folder has solved my issue C:\Users\test\AppData\Local\Yarn
Look at this line in the log error fork-ts-checker-webpack-plugin#1.5.0: The engine "yarn" is incompatible with this module. Expected version ">=1.0.0". It says your yarn version is not compatible. You have yarn v0.16.1 but it has to be above 1.0.0. Please try to update your yarn version.
If anyone else is struggling with this even after uninstalling/reinstalling yarn from npm, for me I actually had an old version of yarn installed outside of npm or another package manager, and I had to uninstall it from the Add or Remove Programs list in Windows.

yo cannot find jhipster after yarn global add generator-jhipster

I'm trying to generate a jHipster project using yarn - https://jhipster.github.io/installation/
I installed Node from its website and yarn with brew.
yarn version 0.19.1
node version v7.5.0
OSX Sierra 10.12.3
When I run yarn global add generator-jhipster, I could see jhispter generator being copied to /Users/{username}/.config/yarn/global/node_modules/
my-mac:~ user$ yarn global add generator-jhipster
yarn global v0.19.1
warning No license field
[1/4] ๐Ÿ” Resolving packages...
[2/4] ๐Ÿšš Fetching packages...
[3/4] ๐Ÿ”— Linking dependencies...
[4/4] ๐Ÿ“ƒ Building fresh packages...
warning undefined has no binaries
warning No license field
โœจ Done in 30.68s.
As the next step, when I run yo jhipster, it cannot find jhipster. However, when I run yarn add generator-jhipster, yo can find jhipster from current folder. Not sure whats wrong with adding in global location.
my-mac:~ user$ echo $PATH
/usr/local/sbin:~/.composer/vendor/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/Cellar/node/7.5.0/bin:/Users/{user}/.config/yarn/global/node_modules/.bin
Will appreciate any help in identify whats going on or if there is any issue with latest yarn version.
my-mac:~ user$ yo jhipster
Error jhipster
You donโ€™t seem to have a generator with the name โ€œjhipsterโ€ installed.
I had the same problem and the cause was my laziness. I did not took time to read the notes of Local installation with Yarn documentation:
Note: if you have problem to use these tools globally, be sure you have $HOME/.config/yarn/global/node_modules/.bin in your path.
On Mac or Linux: export PATH="$PATH:$(yarn global bin):$HOME/.config/yarn/global/node_modules/.bin"
To fix this issue I needed to install yeoman globally with yarn.
yarn global add yo
I am using Ubuntu and I faced this issue too. Then I use sudo to add yo package
sudo yarn global add yo
Hope this will helpful to you.

Resources