When there is already a folder node_modules in the project, we can't generate jhipster without prompt, even if there is the file .yo-rc.json, contrary to before.
It works randomly.
Cause fails during local build for https://github.com/jhipster/generator-jhipster/pull/7484
More important, it cause problems if we want generate again the application for example for an upgrade.
#!/usr/bin/env bash
# -*- coding: UTF8 -*-
set -exu
PS4='\n\ntest@test:\w $ '
generatorDir="$HOME/generator-jhipster/"
export JHIPSTER="ngx-default"
export JHIPSTER_SAMPLES="$generatorDir""/travis/samples"
export APP_FOLDER="$JHIPSTER_SAMPLES""/$JHIPSTER""-sample"
bash "$generatorDir/travis/scripts/01-generate-entities.sh"
cd "$APP_FOLDER"
while true ; do
yarn init -y
yarn link "generator-jhipster"
cp "$JHIPSTER_SAMPLES""/$JHIPSTER""/.yo-rc.json" .
ls -la
jhipster --force --no-insight --skip-checks --with-entities \
--skip-git --skip-commit-hook
done
An error occur started from 10071199b35c7940706d7173ccb12b22d8b28f4f from @MathieuAA (I've used git bisect
).
At 10071199b35c7940706d7173ccb12b22d8b28f4f the output is:
Using JHipster version installed locally in current project's node_modules
Running default command
Executing jhipster:app
Options: force: true, insight: false, skipChecks: true, withEntities: true, skipGit: true, skipCommitHook: true, skip-checks: true, with-entities: true, skip-git: true, skip-commit-hook: true
βββ βββ βββ βββββββββ ββββββββ βββββββ βββββββββ βββββββββ ββββββββ
βββ βββ βββ βββββββββ βββββββββ ββββββββ βββββββββ βββββββββ βββββββββ
βββ βββββββββ βββ βββββββββ βββββββ βββ βββββββ βββββββββ
βββ βββ βββββββββ βββ ββββββββ βββββββ βββ βββββββ ββββββββ
βββββββββ βββ βββ βββββββββ βββ ββββββββ βββ βββββββββ βββ ββββ
βββββββ βββ βββ βββββββββ βββ βββββββ βββ βββββββββ βββ βββ
https://www.jhipster.tech
Welcome to the JHipster Generator v5.0.0-beta.1
_______________________________________________________________________________________________________________
If you find JHipster useful consider supporting our collective https://opencollective.com/generator-jhipster
Documentation for creating an application: https://www.jhipster.tech/creating-an-app/
_______________________________________________________________________________________________________________
Application files will be generated in folder: /home/theuser/generator-jhipster/travis/samples/ngx-default-sample
This is an existing project, using the configuration from your .yo-rc.json file
to re-generate the project...
Installing languages: en, fr
events.js:183
throw er; // Unhandled 'error' event
^
TypeError: Cannot read property 'endsWith' of undefined
at module.exports.getAngularAppName (/home/theuser/generator-jhipster/generators/generator-base.js:2098:56)
at module.exports.getConfig (/home/theuser/generator-jhipster/generators/entity/index.js:190:47)
at Object.<anonymous> (/home/theuser/generator-jhipster/node_modules/yeoman-generator/lib/index.js:399:25)
at /home/theuser/generator-jhipster/node_modules/run-async/index.js:25:25
at new Promise (<anonymous>)
at /home/theuser/generator-jhipster/node_modules/run-async/index.js:24:19
at self.env.runLoop.add.completed (/home/theuser/generator-jhipster/node_modules/yeoman-generator/lib/index.js:400:11)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
Actually (for bd0fe60f0a960537493a110c19f249584a94e0fd) the output is:
EDIT: tomorrow I will improve the demonstration, because probably if you test at bd0fe60f0a960537493a110c19f249584a94e0fd you will not experience troubles.
test@test:~/generator-jhipster/travis/samples/ngx-default-sample $ ls -la
total 24
drwxr-xr-x 4 test users 4096 Jun 16 15:54 .
drwxr-xr-x 33 test users 4096 Jun 16 15:54 ..
drwxr-xr-x 2 test users 4096 Jun 16 15:54 .jhipster
drwxr-xr-x 2 test users 4096 Jun 16 15:55 node_modules
-rw-r--r-- 1 test users 99 Jun 16 15:55 package.json
-rw-r--r-- 1 test users 951 Jun 16 15:55 .yo-rc.json
test@test:~/generator-jhipster/travis/samples/ngx-default-sample $ jhipster --force
--no-insight --skip-checks --with-entities --skip-git --skip-commit-hook
Using JHipster version installed locally in current project's node_modules
Running default command
Executing jhipster:app
Options: force: true, insight: false, skipChecks: true, withEntities: true, skipGit:
true, skipCommitHook: true, skip-checks: true, with-entities: true, skip-git: true,
skip-commit-hook: true
βββ βββ βββ βββββββββ ββββββββ βββββββ βββββββββ βββββββββ ββββββββ
βββ βββ βββ βββββββββ βββββββββ ββββββββ βββββββββ βββββββββ βββββββββ
βββ βββββββββ βββ βββββββββ βββββββ βββ βββββββ βββββββββ
βββ βββ βββββββββ βββ ββββββββ βββββββ βββ βββββββ ββββββββ
βββββββββ βββ βββ βββββββββ βββ ββββββββ βββ βββββββββ βββ ββββ
βββββββ βββ βββ βββββββββ βββ βββββββ βββ βββββββββ βββ βββ
https://www.jhipster.tech
Welcome to JHipster v5.0.0-beta.2
Application files will be generated in folder: /home/test/generator-jhipster/
travis/samples/ngx-default-sample
___________________________________________________________________________________
____________________________
Documentation for creating an application is at https://www.jhipster.tech/creating
-an-app/
If you find JHipster useful, consider sponsoring the project at https://opencollec
tive.com/generator-jhipster
___________________________________________________________________________________
____________________________
? Which *type* of application would you like to create?
β― Monolithic application (recommended for simple projects)
Microservice application
Microservice gateway
JHipster UAA server (for microservice OAuth2 authentication)
See the .jhipster directory
Arch Linux
node v8.11.2
java 1.8.0_172
I will improve the demonstration script. Because actually it fail too randomly.
@pascalgrimaud please could you test code above or code below ?
It's very strange, because on my computer it fails sometime, not every time.
#!/usr/bin/env bash
# -*- coding: UTF8 -*-
set -exu
PS4='\n\ntest@test:\w [\D{%T}] $ '
generatorDir="$HOME/generator-jhipster/"
export JHIPSTER="ngx-default"
export JHIPSTER_SAMPLES="$generatorDir""/travis/samples"
export APP_FOLDER="$JHIPSTER_SAMPLES""/$JHIPSTER""-sample"
export PROFILE="prod"
export PROTRACTOR=1
export UAA_APP_FOLDER="$JHIPSTER_SAMPLES/uaa-sample"
export SPRING_OUTPUT_ANSI_ENABLED="ALWAYS"
export SPRING_JPA_SHOW_SQL="false"
export RUN_APP=1
export IS_TRAVIS_CI=1
declare -i i=0
cd "$generatorDir"
yarn install
# `yarn unlink' because of https://github.com/yarnpkg/yarn/issues/5991
yarn unlink || echo "No 'generator-jhipster' already registred" \
"by \`yarn link'. Good."
yarn link
while true ; do
bash "$generatorDir/travis/scripts/01-generate-entities.sh"
cd "$APP_FOLDER"
yarn init -y
yarn link "generator-jhipster"
# 02-generate-project.sh:
# 1) fail never at 36baafa97d1c9896a944010891b3b30d3d1134f5
# 2) fail SOMETIME at bd0fe60f0a960537493a110c
# (the current jhipster/generator-jhipster master)
# we see a prompt, even if there is a .yo-rc.json
bash "$generatorDir/travis/scripts/02-generate-project.sh"
ls -la
bash "$generatorDir/travis/scripts/03-docker-compose.sh"
bash "$generatorDir/travis/scripts/04-tests.sh"
bash "$generatorDir/travis/scripts/05-run.sh"
i=$((i+1))
echo -e "\\n\\n\\n""\\033[04;31m""Finished""\\033[0m""\\n\\n\\n"
sleep 25
done
Thanks in advance @pascalgrimaud !
@pascalgrimaud @JulioJu Hi, I didn't see I was included in this thread, sorry. Pascal has reverted my changes, so it should work. I'm going to review his revert and see if he has forgotten something.
I can confirm his commit reverted my work, except for the import-jdl subgen. @pascalgrimaud We've talked about this, do you know how this issue is possible?
I see a yarn link
is the sh
sample above, I don't think it's related though.
@JulioJu have you tried checking out from above my commit and cherry-picking the commits after?
@deepu105 Do you mind looking at this too? I need a second pair of eyes (and I bet yours are better than mine ;)). My conclusion: if everything I've done was reverted by Pascal (I've checked, he was thorough), I bet the issue was introduced prior to my commits.
@MathieuAA sorry I havn't seen your commit was reverted. As I said, 10071199b35c7940706d7173ccb12b22d8b28f4f (your commit) fail with an error code. bd0fe60f0a960537493a110c19f249584a94e0fd is different, it doesn't fail : we only see sometimes the prompt with the questions, even if we have .yo-rc.json
.
On my computer, this morning I've tested several time bd0fe60f0a960537493a110c19f249584a94e0fd, and each time I've seen a prompt. I've tested also at 36baafa97d1c9896a944010891b3b30d3d1134f5 (a parent of 10071199b35c7940706d7173ccb12b22d8b28f4f) and all work fine. Now I test again at bd0fe60f0a960537493a110c19f249584a94e0fd and I don't see prompt.
I don't understand. As I said to @pascalgrimaud, I hope is not a problem with my Intel Celeronβ¦ In the past I've already seen some random bugs with JavaScript code. After lot of search, we have seen it depends of when a callback was triggered, so it depends of the power of the computerβ¦ So hard to discover thatβ¦
I will test againβ¦
I don't get it either. If my commit was properly reverted, which I think it was thanks to Pascal, there shouldn't be any problem. Now two possibilities:
You say you've tested everything, how? with the shell script? Have you tried another way?
Try something, don't use yarn in your script.
Yes I've tried another way⦠Maybe not conventional (I will explain later if needed)⦠I must investigate further.
We must use yarn link
because otherwise we not test "$HOME/generator-jhipster"
, but the generator-jhipster installed globallyβ¦
Thanks for your answer @MathieuAA :-).
It's so complicated ;-).
Well, I've been told and reminded that yarn doesn't handle its own links properly starting from v1.7.0, that's why I've suggested this option. There's the option to remove links and use global add
.
Yes, I've seen that tooβ¦ That's why I've downgraded to v1.6.0β¦
Ok, I didn't know it was possible to global add
a folder. Thanks for this tip.
But probably for https://github.com/jhipster/generator-jhipster/pull/7484 it's better to use yarn link
, and not global
install. But thanks to remind me that, I must add a test to forbid use of yarn 1.7.0
!
I don't know if you've found a solution, but if I had to guess, this almost smells like a async problem, if it almost fails randomly (or randomly), and hard to debug...
@MathieuAA
Thanks for your help.
Could you help me please ? At least to confirm the problem.
cd ~/generator-jhipster
git checkout bd0fe60f0a960537493a110c # current master of https://jhipster/generator-jhipster
yarn unlink # mandatory if another folder named "generator-jhipster" is already linked.
yarn link # mandatory to ./build-samples.sh
yarn install
git remote add JulioJu https://github.com/JulioJu/generator-jhipster
git fetch JulioJu
git checkout JulioJu/correct-travis-build -- travis/
./travis/build-samples.sh verify # (answer 1 for the question "how many processβ¦") [ I will delete that later]
# You should have some ./travis, some master.*.errored.*generate.local-travis.log.
# You could stop the first time you see such logfile.
git reset --hard bd0fe60f0a960537493a110c # come back to jhipster/generator-jhipster
rm -R travis/samples/*-sample
systemctl reboot # to reboot your computer
then test with the script https://github.com/jhipster/generator-jhipster/issues/7775#issue-332343549
If I replace bd0fe60f0a960537493a110c by 36baafa97d1c9896a944010891b3b30d3d1134f5 there is no problems for generation. I've tested many times.
With bd0fe60f0a960537493a110c sometimes we have
test@test:~/generator-jhipster/travis/samples/ngx-default-sample $ jhipster --force
--no-insight --skip-checks --with-entities --skip-git --skip-commit-hook
Using JHipster version installed locally in current project's node_modules
Running default command
Executing jhipster:app
Options: force: true, insight: false, skipChecks: true, withEntities: true, skipGit:
true, skipCommitHook: true, skip-checks: true, with-entities: true, skip-git: true,
skip-commit-hook: true
βββ βββ βββ βββββββββ ββββββββ βββββββ βββββββββ βββββββββ ββββββββ
βββ βββ βββ βββββββββ βββββββββ ββββββββ βββββββββ βββββββββ βββββββββ
βββ βββββββββ βββ βββββββββ βββββββ βββ βββββββ βββββββββ
βββ βββ βββββββββ βββ ββββββββ βββββββ βββ βββββββ ββββββββ
βββββββββ βββ βββ βββββββββ βββ ββββββββ βββ βββββββββ βββ ββββ
βββββββ βββ βββ βββββββββ βββ βββββββ βββ βββββββββ βββ βββ
https://www.jhipster.tech
Welcome to JHipster v5.0.0-beta.2
Application files will be generated in folder: /home/test/generator-jhipster/
travis/samples/ngx-default-sample
___________________________________________________________________________________
____________________________
Documentation for creating an application is at https://www.jhipster.tech/creating
-an-app/
If you find JHipster useful, consider sponsoring the project at https://opencollec
tive.com/generator-jhipster
___________________________________________________________________________________
____________________________
? Which *type* of application would you like to create?
β― Monolithic application (recommended for simple projects)
Microservice application
Microservice gateway
JHipster UAA server (for microservice OAuth2 authentication)
@MathieuAA . It's so weird ! I knowβ¦ I'm trying to look furtherβ¦
@JulioJu There may be a better way to tackle the problem. My main issue here is that I don't know how to positively assert (I mean 100% be sure) that the way I check a commit is good. After talking with Pascal about a similar issue (or the same, I'm not so sure anymore), he told me that the best way to test everything is via Travis.
Okβ¦ Yes @pascalgrimaud you tell me the same thingβ¦
But the problem here is with local builds⦠Not local test ! Sometimes I can't build locally⦠The problem is no local tests (see the script https://github.com/jhipster/generator-jhipster/issues/7775#issue-332343549, I use only 02-generate-entities for generate entities). The goal of JHipster is to be build locally, not remotly ;-).
So maybe we must try to understand why there is this bug.
I guess there is a bug introduced between https://github.com/jhipster/generator-jhipster/compare/0a861835d808314fd7da15af3b7ce8c05188ca29...67f529de2286f722ee65cbd318091315d653b0d0.
@MathieuAA maybe the best is to record my screen. As it you could see how the local build (again not local test) occurs ?
I don't understand well this commit. Sorry⦠I must work more on it.
- const done = generator.async();
- generator.spawnCommand('yo', args).on('close', () => {
- done();
If I remember correctly, this made the import-jdl
work perfectly but was a pain in the ass to test. So I had to rollback.
@JulioJu Don't worry, I've reproduced the issue, no need for screen recording
@MathieuAA So cool⦠thanksssss a lot ;-) !!! ;-) !!
I've taken a lot of time about it⦠;-)
When I talked about testing, TravisCI builds an app before the testing. That's why some "tests" failed: there weren't any as there was no build at all.
@JulioJu I've pushed something, in a forked repo of the generator. We'll see if this solves it...
Sorry, I can't help much here, until the JHipster Conf.
I prefer to freeze all my installations to be sure everything works fine for my demo
If I have time, I will use a VM to try to reproduce
@JulioJu Can you try again with the latest commit? It could work.
@MathieuAA
https://github.com/jhipster/generator-jhipster/pull/7800 fix perfectly this issue ! Thanks !
And see you to the JHipster Conf. Have a good preparation :-)
Thank you very much!Β
@MathieuAA I experiment some problems after. With the script https://github.com/jhipster/generator-jhipster/issues/7775#issue-332343549, at 368f25930159806570ce282608f1f4620c523738 now the output is:
Sorry, I've tested to quickly. This morning, I've tested in all situations where I've founded a prompt, and I confirm there is no problems with prompts. But stupidly, I've typed \test@test:~/generator-jhipster/travis/samples/ngx-default-sample $ jhipster --force --no-insight --skip-checks --with-entities --skip-git --skip-commit-hook
Using JHipster version installed locally in current project's node_modules
Running default command
Executing jhipster:app
Options: force: true, insight: false, skipChecks: true, withEntities: true, skipGit: true, skipCommitHook: true, skip-checks: true, with-entities: true, skip-git: tru
e, skip-commit-hook: true
βββ βββ βββ βββββββββ ββββββββ βββββββ βββββββββ βββββββββ ββββββββ
βββ βββ βββ βββββββββ βββββββββ ββββββββ βββββββββ βββββββββ βββββββββ
βββ βββββββββ βββ βββββββββ βββββββ βββ βββββββ βββββββββ
βββ βββ βββββββββ βββ ββββββββ βββββββ βββ βββββββ ββββββββ
βββββββββ βββ βββ βββββββββ βββ ββββββββ βββ βββββββββ βββ ββββ
βββββββ βββ βββ βββββββββ βββ βββββββ βββ βββββββββ βββ βββ
https://www.jhipster.tech
Welcome to JHipster v5.0.0-beta.2
Application files will be generated in folder: /home/julioju/generator-jhipster/travis/samples/ngx-default-sample
_______________________________________________________________________________________________________________
Documentation for creating an application is at https://www.jhipster.tech/creating-an-app/
If you find JHipster useful, consider sponsoring the project at https://opencollective.com/generator-jhipster
_______________________________________________________________________________________________________________
This is an existing project, using the configuration from your .yo-rc.json file
to re-generate the project...
Installing languages: en, fr
Found the .jhipster/BankAccount.json configuration file, entity can be automatically generated!
[HERE SOME LOG OUTPUT ARE DELETED BY ME]
The entity EntityWithServiceImplPaginationAndDTO is being updated.
WARNING! This entity has the DTO option, and it has a relationship with entity "user" that doesn't have the DTO option. This will result in an error.
WARNING! This entity has the DTO option, and it has a relationship with entity "operation" that doesn't have the DTO option. This will result in an error.
WARNING! jpaMetamodelFiltering is missing in .jhipster/Label.json, using 'no' as fallback
WARNING! Cannot use validation in .jhipster/FieldTestEntity.json for field {
"fieldName": "byteImageRequiredTom",
"fieldType": "byte[]",
"fieldTypeBlobContent": "image",
"fieldValidateRules": [
"required"
]
}
[HERE SOME LOG OUTPUT ARE DELETED BY ME]
Hibernate JPA 2 Metamodel does not work with Bean Validation 2 for LOB fields, so LOB validation is disabled
WARNING! jpaMetamodelFiltering is missing in .jhipster/EntityWithServiceClass.json, using 'no' as fallback
WARNING! jpaMetamodelFiltering is missing in .jhipster/EntityWithServiceImpl.json, using 'no' as fallback
WARNING! jpaMetamodelFiltering is missing in .jhipster/EntityWithServiceClassAndPagination.json, using 'no' as fallback
WARNING! jpaMetamodelFiltering is missing in .jhipster/EntityWithServiceImplAndPagination.json, using 'no' as fallback
WARNING! jpaMetamodelFiltering is missing in .jhipster/EntityWithServiceClassAndDTO.json, using 'no' as fallback
WARNING! jpaMetamodelFiltering is missing in .jhipster/EntityWithServiceImplAndDTO.json, using 'no' as fallback
WARNING! jpaMetamodelFiltering is missing in .jhipster/EntityWithServiceClassPaginationAndDTO.json, using 'no' as fallback
WARNING! jpaMetamodelFiltering is missing in .jhipster/EntityWithServiceImplPaginationAndDTO.json, using 'no' as fallback
events.js:183
throw er; // Unhandled 'error' event
^
AssertionError [ERR_ASSERTION]: Trying to copy from a source that does not exist: /home/julioju/generator-jhipster/generators/server/templates/gitattributes.ejs
at EditionInterface.exports._copySingle (/home/julioju/generator-jhipster/node_modules/mem-fs-editor/lib/actions/copy.js:57:3)
at files.forEach.file (/home/julioju/generator-jhipster/node_modules/mem-fs-editor/lib/actions/copy.js:50:10)
at Array.forEach (<anonymous>)
at EditionInterface.exports.copy (/home/julioju/generator-jhipster/node_modules/mem-fs-editor/lib/actions/copy.js:49:9)
at module.exports.copy (/home/julioju/generator-jhipster/generators/generator-base-private.js:648:17)
at blockTemplate.templates.forEach (/home/julioju/generator-jhipster/generators/generator-base.js:2315:42)
at Array.forEach (<anonymous>)
at module.exports.writeFilesToDisk (/home/julioju/generator-jhipster/generators/generator-base.js:2280:45)
at module.exports.writeFiles (/home/julioju/generator-jhipster/generators/server/files.js:1169:18)
at Object.<anonymous> (/home/julioju/generator-jhipster/node_modules/yeoman-generator/lib/index.js:399:25)
Okay, I'll try to reproduce this later.
Ok. In this type of case, I don't know if I must open a new issue or open again this issue. I don't know what is the better way.
I guess it fits, unless there's an objection I suggest to keep it open.
@JulioJu : what is your Yarn version ?
@pascalgrimaud I think he uses v1.6.0. @JulioJu can you do a yarn -v
just to be sure?
Yes, it's v1.6.0 (I've tested again now !). As we said, v1.7.0 introduce some bugs with yarn link
.
@MathieuAA
Below a new bash script who reproduces this bug. If it could help.
#!/usr/bin/env bash
# -*- coding: UTF8 -*-
set -exu
PS4='\n\ntest@test:\w $ '
generatorDir="$HOME/generator-jhipster/"
export JHIPSTER="ngx-default"
export JHIPSTER_SAMPLES="$generatorDir""/travis/samples"
export APP_FOLDER="$JHIPSTER_SAMPLES""/$JHIPSTER""-sample"
cd "$generatorDir"
git checkout 368f25930159806570ce282608f1f4620c523738
yarn install
# `yarn unlink' because of https://github.com/yarnpkg/yarn/issues/5991
yarn unlink || echo "No 'generator-jhipster' already registred" \
"by \`yarn link'. Good."
yarn link
bash "$generatorDir/travis/scripts/01-generate-entities.sh"
cd "$APP_FOLDER"
yarn init -y
yarn link "generator-jhipster"
cp "$JHIPSTER_SAMPLES""/$JHIPSTER""/.yo-rc.json" .
ls -la
jhipster --force --no-insight --skip-checks --with-entities \
--skip-git --skip-commit-hook
@JulioJu : can you test this script without the yarn link "generator-jhipster"
?
@MathieuAA @pascalgrimaud
UPDATED (thanks @deepu105 at https://github.com/jhipster/generator-jhipster/issues/7775#issuecomment-398023428).
Actually, with
#!/usr/bin/env bash
# -*- coding: UTF8 -*-
set -exu
PS4='\n\ntest@test:\w $ '
generatorDir="$HOME/generator-jhipster/"
export JHIPSTER="ngx-default"
export JHIPSTER_SAMPLES="$generatorDir""/travis/samples"
export APP_FOLDER="$JHIPSTER_SAMPLES""/$JHIPSTER""-sample"
cd "$generatorDir"
git checkout 368f25930159806570ce282608f1f4620c523738
yarn install
bash "$generatorDir/travis/scripts/01-generate-entities.sh"
cd "$APP_FOLDER"
cp "$JHIPSTER_SAMPLES""/$JHIPSTER""/.yo-rc.json" .
ls -la
"$generatorDir"/cli/jhipster.js --force --no-insight --skip-checks \
--with-entities --skip-git --skip-commit-hook
I have
test@test:~/generator-jhipster/travis/samples/ngx-default-sample $ ls -la
total 16
drwxr-xr-x 3 julioprayer users 4096 Jun 18 15:01 .
drwxr-xr-x 37 julioprayer users 4096 Jun 18 15:01 ..
drwxr-xr-x 2 julioprayer users 4096 Jun 18 15:01 .jhipster
-rw-r--r-- 1 julioprayer users 951 Jun 18 15:01 .yo-rc.json
test@test:~/generator-jhipster/travis/samples/ngx-default-sample $ /home/julioprayer/generator-jhipster//cli/jhipster.js --force --no-insight --skip-checks --with-ent
ities --skip-git --skip-commit-hook
Using JHipster version installed globally
Running default command
Executing jhipster:app
Options: force: true, insight: false, skipChecks: true, withEntities: true, skipGit: true, skipCommitHook: true, skip-checks: true, with-entities: true, skip-git: tru
e, skip-commit-hook: true
βββ βββ βββ βββββββββ ββββββββ βββββββ βββββββββ βββββββββ ββββββββ
βββ βββ βββ βββββββββ βββββββββ ββββββββ βββββββββ βββββββββ βββββββββ
βββ βββββββββ βββ βββββββββ βββββββ βββ βββββββ βββββββββ
βββ βββ βββββββββ βββ ββββββββ βββββββ βββ βββββββ ββββββββ
βββββββββ βββ βββ βββββββββ βββ ββββββββ βββ βββββββββ βββ ββββ
βββββββ βββ βββ βββββββββ βββ βββββββ βββ βββββββββ βββ βββ
https://www.jhipster.tech
Welcome to JHipster v5.0.0-beta.2
Application files will be generated in folder: /home/julioprayer/generator-jhipster/travis/samples/ngx-default-sample
_______________________________________________________________________________________________________________
Documentation for creating an application is at https://www.jhipster.tech/creating-an-app/
If you find JHipster useful, consider sponsoring the project at https://opencollective.com/generator-jhipster
_______________________________________________________________________________________________________________
This is an existing project, using the configuration from your .yo-rc.json file
to re-generate the project...
Installing languages: en, fr
Found the .jhipster/BankAccount.json configuration file, entity can be automatically generated!
The entity BankAccount is being updated.
[HERE SOME LOG OUTPUT ARE DELETED BY ME]
WARNING! This entity has the DTO option, and it has a relationship with entity "user" that doesn't have the DTO option. This will result in an error.
WARNING! This entity has the DTO option, and it has a relationship with entity "operation" that doesn't have the DTO option. This will result in an error.
WARNING! jpaMetamodelFiltering is missing in .jhipster/Label.json, using 'no' as fallback
WARNING! Cannot use validation in .jhipster/FieldTestEntity.json for field {
"fieldName": "byteImageRequiredTom",
"fieldType": "byte[]",
"fieldTypeBlobContent": "image",
"fieldValidateRules": [
"required"
]
}
[HERE SOME LOG OUTPUT ARE DELETED BY ME]
Hibernate JPA 2 Metamodel does not work with Bean Validation 2 for LOB fields, so LOB validation is disabled
WARNING! Cannot use validation in .jhipster/FieldTestPaginationEntity.json for field {
"fieldName": "byteTextMaxbytesAlice",
"fieldType": "byte[]",
"fieldTypeBlobContent": "text",
"fieldValidateRules": [
"maxbytes"
],
"fieldValidateRulesMaxbytes": 10000
}
Hibernate JPA 2 Metamodel does not work with Bean Validation 2 for LOB fields, so LOB validation is disabled
WARNING! jpaMetamodelFiltering is missing in .jhipster/EntityWithServiceClass.json, using 'no' as fallback
WARNING! jpaMetamodelFiltering is missing in .jhipster/EntityWithServiceImpl.json, using 'no' as fallback
WARNING! jpaMetamodelFiltering is missing in .jhipster/EntityWithServiceClassAndPagination.json, using 'no' as fallback
WARNING! jpaMetamodelFiltering is missing in .jhipster/EntityWithServiceImplAndPagination.json, using 'no' as fallback
WARNING! jpaMetamodelFiltering is missing in .jhipster/EntityWithServiceClassAndDTO.json, using 'no' as fallback
WARNING! jpaMetamodelFiltering is missing in .jhipster/EntityWithServiceImplAndDTO.json, using 'no' as fallback
WARNING! jpaMetamodelFiltering is missing in .jhipster/EntityWithServiceClassPaginationAndDTO.json, using 'no' as fallback
WARNING! jpaMetamodelFiltering is missing in .jhipster/EntityWithServiceImplPaginationAndDTO.json, using 'no' as fallback
events.js:183
throw er; // Unhandled 'error' event
^
AssertionError [ERR_ASSERTION]: Trying to copy from a source that does not exist: /home/julioprayer/generator-jhipster/generators/server/templates/gitattributes.ejs
at EditionInterface.exports._copySingle (/home/julioprayer/generator-jhipster/node_modules/mem-fs-editor/lib/actions/copy.js:57:3)
at files.forEach.file (/home/julioprayer/generator-jhipster/node_modules/mem-fs-editor/lib/actions/copy.js:50:10)
at Array.forEach (<anonymous>)
at EditionInterface.exports.copy (/home/julioprayer/generator-jhipster/node_modules/mem-fs-editor/lib/actions/copy.js:49:9)
at module.exports.copy (/home/julioprayer/generator-jhipster/generators/generator-base-private.js:648:17)
at blockTemplate.templates.forEach (/home/julioprayer/generator-jhipster/generators/generator-base.js:2315:42)
at Array.forEach (<anonymous>)
at module.exports.writeFilesToDisk (/home/julioprayer/generator-jhipster/generators/generator-base.js:2280:45)
at module.exports.writeFiles (/home/julioprayer/generator-jhipster/generators/server/files.js:1169:18)
at Object.<anonymous> (/home/julioprayer/generator-jhipster/node_modules/yeoman-generator/lib/index.js:399:25)
@MathieuAA I think I experienced similar error about missing gitattributes.ejs
file when working on the blueprint stuff yesterday as well, and this is why I was a bit afraid of the global changes you made for import-jdl earlier as I didnt study how it works and was afriad it might add side effects. Or it could be a problem from some changes I made as well. So may be its a good idea to isolate things related to import-jdl for the time being so that remaining part doesnt get any unintentional side effects. yeoman is a PITA to debug unfortunately
@pascalgrimaud given that NPM is almost as fast as Yarn now, may be we should just switch back to npm as default as atleast its not buggy. yarn lateley is very buggy
@JulioJu do you see same issue if you use npm instead of yarn? I tried with npm and it doesnt happen, but yesterday I saw it when doing something else and I was using Yarn
@JulioJu I think in the last comment you made you are generating in the wrong directory, Application files will be generated in folder: /home/julioju/generator-jhipst
er
@deepu105, I'm so stupidβ¦ For sure, my last script was wrongβ¦ Ok, I will test againβ¦
@deepu105 : my comments are the same than https://github.com/jhipster/generator-jhipster/issues/7551#issuecomment-385455182
Maybe we should do a vote on our ML ?
@deepu105 on my computer npm link
needs sudo
β¦ When I work sometimes I couldn't be root (if I work at University).
I'm very disappointed. The bug discribed at https://github.com/jhipster/generator-jhipster/issues/7775#issuecomment-398003016 (where I don't use yarn link
) or at https://github.com/jhipster/generator-jhipster/issues/7775#issuecomment-397994908 (where I use yarn link
) seems also to be random. Actually, I test again and again this script and all work fine :cry:.
I will test again later with npm link
, but I guess it could cause problems too. Again, the script described at https://github.com/jhipster/generator-jhipster/issues/7775#issuecomment-398003016 doesn't use yarn link
!
@pascalgrimaud, @deepu105, @jdubois @MathieuAA
I'm strongly against npm
because npm link
needs root. And sometimes I havn't root ;-).
I know symlink are not very good. On MS Windows 7, symlink needs elevated privilege (https://security.stackexchange.com/questions/10194/why-do-you-have-to-be-an-admin-to-create-a-symlink-in-windows).
Therefore, maybe, the best is simply write an executable file ~/generator-jhipster/cli/jhipster (no strange symlinks). As it, ~/generator-jhipster/travis/sample/sample_name-sample/node_modules/generator-jhipster will be a standard folder. And at CONTRIBUTE.md, we could advise to test by simply launch ~/generator-jhipster/travis/cli/jhipster, not use yarn link
or npm link
. As it, no problems with strange symlink
or sudo
.
~/generator-jhipster/travis/cli/jhipster could be simply a wrapper around ~/generator-jhipster/travis/cli/jhipster.js, with a shebang #!/usr/bin/env node
.
@JulioJu It's a well-known issue of NPM. Look at the doc, they explain how to bypass the need for a root user.
@MathieuAA ok thanks⦠Sorry ! I will check⦠But before I try to trigger a new fail⦠Even with yarn link
. It's strange, because it's by phase. On my computer, when it fail, it fail for several generations, even after a reboot of my computer. And when there is no problems, it's for several generations. Maybe depends of the moon :rofl: :laughing: . Whant do you think about that :wink: ;-) ?
I did some tests, and for me, there are no issue at all.
Everything works fine on my side, if I don't use yarn link
. So it's OK the this new release: v5.0.0-beta.3
.
@JulioJu : if you can provide me a complete use case to reproduce your issue... Otherwise, we could work together on it, at JHipster Conf.
@pascalgrimaud as I said, actually at 368f25930159806570ce282608f1f4620c523738 all work fine⦠I agree with you. I test, and test again, all work fine. I reproduce exactly the same steps than this morning (it's easy because it's a bash script), but all work fine.
This morning and at the beginning of afternoon, I've tested several timeβ¦ And it fails each time. Actually, it doesn't want failβ¦ All work fine. I don't understand. It's very very very strangeβ¦
If it fails again, I will record my screen. It's very very very strangeβ¦
Why this afternoon all work ? And why this morning it doesn't work ? Again, I repeat, I agree, actually all work !
@MathieuAA you said you will test it. Have you also experimented this issue at 368f25930159806570ce282608f1f4620c523738 and with the script described at https://github.com/jhipster/generator-jhipster/issues/7775#issuecomment-397994908 ?
@deepu105 at https://github.com/jhipster/generator-jhipster/issues/7775#issuecomment-398010614 you said you've experimented a similar issue. Is it before 22:57, with 368f25930159806570ce282608f1f4620c523738 (I see @jdubois merged it at 22:57 UTC+2) ?
It's very strange⦠If @deepu105 you have experimented this issue yesterday, it means that this issue could be confirmed ?
But it's very strange that on @pascalgrimaud computer and on my computer, actually all work fine.
@JulioJu not yet, didn't have much time
@pascalgrimaud
This morning, I've tested several times. With npm link
no problems seems occured, contrary to yarn link
. I've npm 6.1.0. This morning, I've tested again with yarn link
I experiment some problems.
But on my computer (Intel Celeron), npm link
take more much time than yarn link
.
@JulioJu that's the beauty of NPM. If you don't experience issues today (using NPM, of course), can this issue be closed?
I think no point wasting time here. We really need to discuss about
switching back to NPM, Yarn is recently a PITA especially when it comes to
developing with it
Thanks & Regards,
Deepu
On Tue, Jun 19, 2018 at 8:26 AM Mathieu ABOU-AICHI notifications@github.com
wrote:
@JulioJu https://github.com/JulioJu that's the beauty of NPM. If you
don't experience issues today (using NPM, of course), can this issue be
closed?β
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/7775#issuecomment-398288345,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF8Uf_HC96s08ksxTYRUeqPtopjw2ks5t-JmOgaJpZM4UntOX
.
closing as the its a Yarn issue
@deepu105 , @pascalgrimaud , @MathieuAA
DELETED
(see comment history to retrieve this comment).
I repeat, I don't know if the problem if with yarn
. I've tested sometimes without yarn link
and I experiment some problems.
Or maybe it's my computer. I experiment this after a reboot of my computer.
If I could say again, npm link
is very, very, very longer than yarn link
. I :cry:, with npm
, it's so longβ¦
Moreover, I don't understand why yarn
could cause problems for the error described above, because the problem seems don't occur during yarn install
step. But maybe I say very bad things⦠Maybe⦠:anguished: :anguished: :confused: :confused: .
Or maybe/probably an error of myself.
@JulioJu again its a yarn issue, see below, I encounter it when doing a simple yarn -v
on Fedora
$ yarn -v
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
path.js:1167
cwd = process.cwd();
^
Error: ENOENT: no such file or directory, uv_cwd
at Object.resolve (path.js:1167:25)
at Function.Module._resolveLookupPaths (module.js:424:17)
at Function.Module._resolveFilename (module.js:541:20)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/share/yarn/bin/yarn.js:25:13)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
@deepu105 : we can discuss about it tomorrow, but I think it's time to put NPM as default and Yarn as flag. I will do it after JHipster Conf. Maybe we should open a new issue for that ?
@deepu105
It's strange. A simple yarn -v
should not cause this problem⦠I havn't this issue. It look like a problem with symlink https://stackoverflow.com/questions/12338233/shell-init-issue-when-click-tab-whats-wrong-with-getcwd. I've found other issues like this. But nothing at https://github.com/yarnpkg/yarn/issues
At https://github.com/jhipster/generator-jhipster/issues/7775#issuecomment-398378806 there was a big mistake. Sorry ! Please consider only the following test, and not the script above. Forget script above.
#!/usr/bin/env bash
# -*- coding: UTF8 -*-
set -exu
export PS4='\n\ntest@test:\w $ '
nodeModulePath=$(npm config get prefix)
export PATH="$nodeModulePath/bin:""$PATH"
generatorDir="$HOME/generator-jhipster/"
globalGeneratorDir="$nodeModulePath""/lib/node_modules/generator-jhipster"
export JHIPSTER="ngx-default"
export JHIPSTER_SAMPLES="$generatorDir""/travis/samples"
export APP_FOLDER="$JHIPSTER_SAMPLES""/$JHIPSTER""-sample"
npm install -g generator-jhipster
file "$globalGeneratorDir"
cd "$generatorDir"
npm install
# We are sure that it's "$generatorDir" who is linked
# I've tested, `npm` hasn't bug reported by me at
# https://github.com/yarnpkg/yarn/issues/5991
npm link
file -E "$globalGeneratorDir"
bash "$generatorDir/travis/scripts/01-generate-entities.sh"
cd "$APP_FOLDER"
npm init -y
npm link "generator-jhipster"
file -E "node_modules/generator-jhipster"
cp "$JHIPSTER_SAMPLES""/$JHIPSTER""/.yo-rc.json" .
ls -la
jhipster --force --no-insight --skip-checks --with-entities --skip-git \
--skip-commit-hook
As before, I don't use yarn
.
And I've the issue that I want show at the beginning. Please, sorry for my error at https://github.com/jhipster/generator-jhipster/issues/7775#issuecomment-398378806, and please look the following output.
The error that occurs is:
create src/test/javascript/spec/app/entities/entity-with-service-impl-pagination-
and-dto/entity-with-service-impl-pagination-and-dto.service.spec.ts
create src/test/javascript/e2e/entities/entity-with-service-impl-pagination-and-d
to/entity-with-service-impl-pagination-and-dto.page-object.ts
create src/test/javascript/e2e/entities/entity-with-service-impl-pagination-and-d
to/entity-with-service-impl-pagination-and-dto.spec.ts
I'm all done. Running yarn install for you to install the required dependencies. If
this fails, try running the command yourself.
yarn install v1.7.0
info No lockfile found.
[1/5] Validating package.json...
[2/5] Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/@angular%2fcommon:
self signed certificate".
info If you think this is a bug, please open a bug report with the information provi
ded in "/home/julioprayer/generator-jhipster/travis/samples/ngx-default-sample/yarn-
error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this comm
and.
yarn run v1.7.0
$ yarn run cleanup && yarn run webpack:build:main
$ rimraf target/{aot,www}
$ yarn run webpack -- --config webpack/webpack.dev.js --progress --profile
warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarde
d. In a future version, any explicit "--" will be forwarded as-is to the scripts.
$ node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js --config webpac
k/webpack.dev.js --progress --profile
module.js:549
throw err;
^
Error: Cannot find module '/home/julioprayer/generator-jhipster/travis/samples/ngx-d
efault-sample/node_modules/webpack/bin/webpack.js'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
If you find JHipster useful consider supporting our collective https://opencollectiv
e.com/generator-jhipster
Server application generated successfully.
Run your Spring Boot application:
./mvnw
events.js:183
throw er; // Unhandled 'error' event
^
Error: ERROR! webpack:build failed.
at Environment.error (/home/julioprayer/generator-jhipster/node_modules/yeoman-e
nvironment/lib/environment.js:157:40)
at module.exports.error (/home/julioprayer/generator-jhipster/generators/generat
or-base.js:1973:18)
at module.exports.end (/home/julioprayer/generator-jhipster/generators/client/in
dex.js:401:18)
at Object.<anonymous> (/home/julioprayer/generator-jhipster/node_modules/yeoman-
generator/lib/index.js:399:25)
at /home/julioprayer/generator-jhipster/node_modules/yeoman-generator/node_modul
es/run-async/index.js:25:25
at new Promise (<anonymous>)
at /home/julioprayer/generator-jhipster/node_modules/yeoman-generator/node_modul
es/run-async/index.js:24:19
at self.env.runLoop.add.completed (/home/julioprayer/generator-jhipster/node_mod
ules/yeoman-generator/lib/index.js:400:11)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)
I will try againβ¦
@pascalgrimaud
Thanks a lot for your help of yesterday :-). I've tested deeply, and all work fine for my pull #7484.
So I will make a PR to remove the advise of use npm link "generator-jhipster"
or yarn link "generator-jhipster
in CONTRIBUTE.md. Are you ok ?
For #7484 I'm going to continue to use yarn
, because yarn link
is increadibly faster than npm link
. On my Intel Celeron I cry when I launch npm link
.
cd generator-jhipster && yarn link
resolves all my problems, if yarn global bin
is in the "$PATH". Thank you very muchβ¦
Thanks this, I understand why @deepu105 is right (sorry @deepu105) . Actually, ./build-samples.sh
is actually not broken. But it could be used in a wrong maneer, that's why it doesn't work for me. It couldn't work, especially if we follow actual guide "CONTRIBUTE.md".
Are you agree ?
@JulioJu
You're welcome :)
About removing yarn link generator-jhipster
or npm link generator-jhipster
, give me some time to think about it. Currentlyt, it is needed just after the generation, not before. And it should be fixed as soon as another version of Yarn is released.
But I saw yesterday, you use Yarn 1.9.x -> does it work well with yarn link generator-jhipster ?
@pascalgrimaud
No⦠But as you could see at https://github.com/jhipster/generator-jhipster/issues/7775#issuecomment-398725526, npm link "generator-jhipster"
doesn't work actually. It seems to be a problem with the generator-jhipster
.
In this comment, I'm going to demonstrate that.
npm link
vs yarn link
npm link
npm link "generator-jhipster"
in the foldter "$GENERATOR_JHIPSTER"
symlink $(npm config get prefix)/lib/node_modules/generator-jhipster
to "$GENERATOR_JHIPSTER".
Demonstration :
julioprayer@archvostro: ~/generator-jhipster correct-travis-build
$ file ~/.npm-global/lib/node_modules/generator-jhipster
/home/julioprayer/.npm-global/lib/node_modules/generator-jhipster: cannot open `/home/julioprayer/.npm-global/lib/node_modules/generator-jhipster' (No such file or direct
ory)
julioprayer@archvostro: ~/generator-jhipster correct-travis-build @ [10:29:58]
$ npm link
> [email protected] postinstall /home/julioprayer/generator-jhipster/node_modules/spawn-sync
> node postinstall
added 85 packages from 106 contributors, removed 104 packages, updated 561 packages and audited 7463 packages in 48.602s
found 2 vulnerabilities (1 moderate, 1 high)
run `npm audit fix` to fix them, or `npm audit` for details
/home/julioprayer/.npm-global/bin/jhipster -> /home/julioprayer/.npm-global/lib/node_modules/generator-jhipster/cli/jhipster.js
/home/julioprayer/.npm-global/lib/node_modules/generator-jhipster -> /home/julioprayer/generator-jhipster
julioprayer@archvostro: ~/generator-jhipster correct-travis-build @ [10:30:56]
$ npm unlink
removed 1 package in 10.021s
julioprayer@archvostro: ~/generator-jhipster correct-travis-build @ [10:32:36]
$ file ~/.npm-global/lib/node_modules/generator-jhipster
/home/julioprayer/.npm-global/lib/node_modules/generator-jhipster: cannot open `/home/julioprayer/.npm-global/lib/node_modules/generator-jhipster' (No such file or direct
ory)
Note: it takes lot of time in my computer.
yarn link
The only difference with command npm link
above is the symlink. yarn link
seems behave better than npm link
, because it symlinks only the executable, not all the project. Symlink only the executable is the default behaviour (see ls -la ~/.npm-global/bin
).
Demonstration:
julioprayer@archvostro: ~/generator-jhipster correct-travis-build @ [10:35:17]
$ yarn link
yarn link v1.9.0-20180614.1132
success Registered "generator-jhipster".
info You can now run `yarn link "generator-jhipster"` in the projects where you want to use this package and it will be used instead.
Done in 0.28s.
julioprayer@archvostro: ~/generator-jhipster correct-travis-build @ [10:35:20]
$ file ~/.npm-global/bin/jhipster
/home/julioprayer/.npm-global/bin/jhipster: symbolic link to ../../generator-jhipster/cli/jhipster.js
julioprayer@archvostro: ~/generator-jhipster correct-travis-build @ [12:15:51]
$ file ~/.npm-global/bin/jhipster
/home/julioprayer/.npm-global/bin/jhipster: cannot open `/home/julioprayer/.npm-global/bin/jhipster' (No such file or directory)
yarn link
or npm link
in "$GENERATOR_JHIPSTER" are enough, not needs to npm link "generator-jhipster"
or yarn link "generator-jhipster"
npm link "generator-jhipster"
=== yarn link "generator-jhipster"
Demonstration:
npm link "generator-jhipster"
Like with yarn link "generator-jhipster"
just below we see than
node_modules/generator-jhipster: symbolic link to ../../../../../.npm-global/lib/node_modules/generator-jhipster
Demonstration
julioprayer@archvostro: ~/generator-jhipster/travis/samples/ngx-default-sample correct-travis-build @ [10:40:08]
$ npm link "generator-jhipster"
/home/julioprayer/.npm-global/bin/jhipster -> /home/julioprayer/.npm-global/lib/node_modules/generator-jhipster/cli/jhipster.js
> [email protected] postinstall /home/julioprayer/.npm-global/lib/node_modules/generator-jhipster/node_modules/spawn-sync
> node postinstall
+ [email protected]
added 461 packages from 299 contributors in 52.531s
/home/julioprayer/generator-jhipster/travis/samples/ngx-default-sample/node_modules/generator-jhipster -> /home/julioprayer/.npm-global/lib/node_modules/generator-jhipste
r
julioprayer@archvostro: ~/generator-jhipster/travis/samples/ngx-default-sample correct-travis-build @ [10:41:51]
$ file node_modules/generator-jhipster
node_modules/generator-jhipster: symbolic link to ../../../../../.npm-global/lib/node_modules/generator-jhipster
julioprayer@archvostro: ~/generator-jhipster/travis/samples/ngx-default-sample correct-travis-build @ [10:42:04]
$ npm unlink "generator-jhipster"
[LOGS DELETED BY ME HERE]
added 14 packages from 41 contributors, removed 204 packages, updated 1694 packages and audited 51791 packages in 301.718s
found 7 vulnerabilities (6 low, 1 high)
run `npm audit fix` to fix them, or `npm audit` for details
julioprayer@archvostro: ~/generator-jhipster/travis/samples/ngx-default-sample correct-travis-build @ [10:47:22]
$ file ~/.npm-global/lib/node_modules/generator-jhipster
/home/julioprayer/.npm-global/lib/node_modules/generator-jhipster: directory
Like with npm link "generator-jhipster"
above we see than
node_modules/generator-jhipster: symbolic link to ../../../../../.npm-global/lib/node_modules/generator-jhipster
Demonstration:
julioprayer@archvostro: ~/generator-jhipster/travis/samples/ngx-default-sample correct-travis-build @ [10:47:36]
$ yarn link
yarn link v1.9.0-20180614.1132
success Registered "jhipster-sample-application".
info You can now run `yarn link "jhipster-sample-application"` in the projects where you want to use this package and it will be used instead.
Done in 0.34s.
julioprayer@archvostro: ~/generator-jhipster/travis/samples/ngx-default-sample correct-travis-build @ [10:48:24]
$ file ~/.npm-global/lib/node_modules/generator-jhipster
/home/julioprayer/.npm-global/lib/node_modules/generator-jhipster: directory
julioprayer@archvostro: ~/generator-jhipster/travis/samples/ngx-default-sample correct-travis-build @ [10:48:27]
$ yarn unlink "generator-jhipster"
yarn unlink v1.9.0-20180614.1132
success Removed linked package "generator-jhipster".
info You will need to run `yarn` to re-install the package that was linked.
Done in 0.29s.
julioprayer@archvostro: ~/generator-jhipster/travis/samples/ngx-default-sample correct-travis-build @ [12:13:27]
$ file ~/.npm-global/lib/node_modules/generator-jhipster
/home/julioprayer/.npm-global/lib/node_modules/generator-jhipster: directory
yarn link "generator-jhipster"
and npm link "generator-jhipster"
have strictly the same effect. The only difference is than npm link "generator-jhipster"
is incredibly longer than yarn link "generator-jhipster"
because npm
performs also not useful npm install
.
Therefore yarn link "generator-jhipster"
and npm link "generator-jhipster"
are totally not useful ! And both bugs⦠Again I've demonstrated that thanks https://github.com/jhipster/generator-jhipster/issues/7775#issuecomment-398725526 :-).
Maybe, yarn
works well, and there is no need to switch completely to npm
.
We should only advise to not use yarn link "generator-jhipster"
or npm link "generator-jhipster"
because they are buggy with the current generator. They perform a non useful symlink for ngx-default/node_modules/generator-jhipster
, and the generator doesn't like that.
npm link
is longer than yarn link
because it triggers non useful yarn install
.
Most helpful comment
And see you to the JHipster Conf. Have a good preparation :-)