Problem with creating an entity with Jhipster - jhipster

I'm using the latest version of jHipster (7) and I have a problem when I try to generate an entity with jhipster entity command. It says that a node-module is missing :
Cannot find module 'ajv/dist/compile/context'
And when I look at some project I've generated with an other version of jHipster, I can find this file. I think it's a pb with the new version as it's the first time I have this pb...
I tried to find the missing file on internet, but i don't find it.

For anyone looking for the workaround for this issue in jhipster version 7 :
you can find it here :
Workarounds:
1. npm install -g npm#latest (Or just downgrade npm version at pom.xml)
2. Recreate package-lock/node_modules
3. rm -rf package-lock.json node_modules
4. npm install
source : comment github link

Related

No matching version found for internal-slot#^1.0.3

I'am facing a problem with npm installation.
I am trying to make an npm install on an Angular application but i got a message depicted on the picture above :
No matching version found for internal-slot#^1.0.3
I have tried to check which package use the internal-slot (npm ls internal-slot), but returns me empty!
So to figure out from where this problem is produced, I removed set of npm dependencies by set, and i made an install after each modification, but unfortunately the problem persist.
Any kind of help will be appreciable!
NPM told you which package this is a dependency of: es-abstract (second to last line).
Looking at NPM, I see that internal-slot has a most recent version of 1.0.3, which tells me there might be a conflict with another Angular dependency (or dependency chain).
Try try adding the package directly to your project, but with an exact version number:
npm i internal-slot#1.0.3 --save-exact
This will specify an exact version, not a "compatible" one (no ^ prefix on the version in package.json), and will likely override (or expose) other dependencies.

Angular5 node js and npm installation problems

I have the latest versions of Node and NPM installed, using which I installed Angular/cli, but it's shooting me with following errors: angular/cli and npm versions not compatible with current version of node.
I suspect that I may(not) be installing out of the proper directory. But at this point, what else can I do? thanks.
Please check: Screenshot with details of the issue
I also faced a similar problem, but the solution was quite simple : my path was too long.
I shortened it a bit (two directories down) and then I did the install again with success.
Here are the reqs.
Both the CLI and generated project have dependencies that require Node 6.9.0 or higher, together with NPM 3 or higher.
You are using the latest node.js 9.2
you need to uninstall or rollback to 8.9 !!
Here is a guide
https://github.com/angular/angular-cli
Hope this solves it for you.
I faced a similar problem with angular/cli version not compatible with the current node version. This generally happens when you are upgrading from lower version of Angular to any other higher version.
You can try following steps:
npm outdated --> To list latest and current package details in local application.
npm update --> to update the local packages.
If it still doesn`t work,
Try deleting the 'node_modules' folder and install dependencies of fresh:
npm install
You can then check whether all packages, including the cli is not outdated.

Cannot Find name Partial

I am using ngx-bootstrap 1.9.2 npm package, but when I try to compile, my project, angular throws following error:
ERROR in C:/xxx/xx/node_modules/ngx-bootstrap/datepicker/bs-datepicker.component.d.ts (46,15): Cannot find name 'Partial'.
ERROR in C:/xxx/xx/node_modules/ngx-bootstrap/datepicker/bs-daterangepicker.component.d.ts (45,15): Cannot find name 'Partial'.
As Partial was introduced in ts version 2.1, I tried upgrading typescript version from 2.0.0 to 2.5.2 nothing helped.
we use typescript 2.4.2, because it's mandatory for angular#5.
What can help:
check global version of typescript
check local version of TS (and clean install and clean build)
if you are using Visual Studio, it has addition TS version
(this link may help https://github.com/Microsoft/TypeScript/issues/5995 )
It was just cache issue, I just perform npm cache clean and performed clean install and my problem was solved.
By the way thanks all, for your comments and answers.
For me it worked after doing the following steps.
install the latest typescript version globally. use below command.
npm install -g typescript#latest
Clean the npm cache using
npm clean cache
Install the latest typescript locally.
npm install -g typescript#latest
And it worked for me. Hope it helps.

Jhipster yo jhipster is not updating existing project

I have created a project using Jhipster v4.0.5. Now have upgraded generator-jhipster to latest one i.e. v4.0.7 and tried to upgrade my existing project manually. But upgrade is not happening because no single file is changed after using command yo jhipster or yo jhipster --with-entities.
Have confirmed this through '.yo-rc.json', it is still showing {"jhipsterVersion": "4.0.5"}.
Does anyone know fix for this issue ?
You're probably using the generator-jhipster in your project's node_modules folder, delete it and re-run npm install or yarn install.
Why don't you use yo jhipster:upgrade rather than re-generating everything and losing all your customizations? See documentation

Unable to update jhipster version

Currently I am using Jhipster 2.23.0 version but 2.23.1 is available so tried to update Jhipster using npm update -g generator-jhipster but still when i do yo jhipster it shows 2.23.0 version.
I have also recently update my JHipster application. To be sure that your generator is updated check first if the version you want, got installed properly:
npm list generator-jhipster
After that yo jhipster will update your application.
As a hint allways read the releas notes:
http://jhipster.github.io/releases/
it can save you a lot of time.
cheers,
duderoot
Try the following command
npm update -g generator-jhipster#2.23.1
I'm using the latest 2.26.2 now and with no issues. When yo changes, you will be notified to update. I just did:
npm install -g yo
and then ...
npm install -g generator-jhipster
JHipster is a Yeoman generator so I assume that yo needed update first. Has your issue been remedied?

Resources