generator-jhipster: "jhipster aws" error "/node_modules/generator-jhipster/node_modules/less" not found
Overview of the issue
Error running “jhiptser aws” on multiple macOS and Linux machines.
jhispter aws
Installing AWS dependencies into your JHipster folder
events.js:182
throw er; // Unhandled 'error' event
^
Error: ERROR! Something went wrong while installing:
warning Pattern ["uuid@^3.1.0"] is trying to unpack in the same destination "/usr/local/share/.cache/yarn/v1/npm-uuid-3.1.0-3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" as pattern ["uuid@^3.0.0"]. This could result in a non deterministic behavior, skipping.
warning There appears to be trouble with your network connection. Retrying...
warning fsevents@1.1.2: The platform "linux" is incompatible with this module.
error An unexpected error occurred: "ENOENT: no such file or directory, lstat '/home/supercobra/workspace/q-cloud-jhipster/node_modules/generator-jhipster/node_modules/less'".
at Environment.error (/usr/local/share/.config/yarn/global/node_modules/yeoman-environment/lib/environment.js:140:40)
at child.error (/usr/local/share/.config/yarn/global/node_modules/generator-jhipster/generators/generator-base.js:1682:18)
at AwsFactory.shelljs.exec (/usr/local/share/.config/yarn/global/node_modules/generator-jhipster/generators/aws/lib/aws.js:21:39)
at /usr/local/share/.config/yarn/global/node_modules/shelljs/src/exec.js:204:9
at ChildProcess.exithandler (child_process.js:277:5)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at maybeClose (internal/child_process.js:927:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
Reproduce the error
Run same command: jhipster aws.
Workaround
In some cases, running npm install aws-sdk before running jhipster aws solves the issue.
JHipster Version(s)
v4.7.0
JHipster Version(s)
q@0.0.0 /home/supercobra/workspace/q-cloud-jhipster
└── (empty)
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.metadot.q",
"nativeLanguage": "en"
},
"jhipsterVersion": "4.6.2",
"baseName": "q",
"packageName": "com.metadot.q",
"packageFolder": "com/metadot/q",
"serverPort": "8080",
"authenticationType": "oauth2",
"hibernateCache": "no",
"clusteredHttpSession": false,
"websocket": "spring-websocket",
"databaseType": "sql",
"devDatabaseType": "postgresql",
"prodDatabaseType": "postgresql",
"searchEngine": false,
"messageBroker": false,
"serviceDiscoveryType": false,
"buildTool": "gradle",
"enableSocialSignIn": false,
"clientFramework": "angularX",
"useSass": false,
"clientPackageManager": "yarn",
"applicationType": "monolith",
"testFrameworks": [
"gatling",
"protractor"
],
"jhiPrefix": "jhi",
"enableTranslation": true,
"nativeLanguage": "en",
"languages": [
"en",
"ar-ly",
"zh-cn",
"da",
"nl",
"fa",
"fr",
"de",
"hi",
"id",
"it",
"ja",
"ko",
"pl",
"pt-br",
"pt-pt",
"ro",
"ru",
"sk",
"sr",
"sv",
"th",
"ua",
"vi"
]
}
}
JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions
entity SystemMessage (system_message) {
message String required maxlength(250),
url String maxlength(1999),
importance Integer min(0) max(2),
isLive Boolean,
isClosableByUser Boolean
}
paginate SystemMessage with infinite-scroll
service SystemMessage with serviceClass
angularSuffix SystemMessage with x
Environment and Tools
java version “1.8.0_144” Java™ SE Runtime Environment (build 1.8.0_144-b01) Java HotSpot™ 64-Bit Server VM (build 25.144-b01, mixed mode)
git version 2.7.4
node: v8.4.0
npm: 5.3.0
bower: 1.8.0
gulp: [12:44:21] CLI version 1.4.0
yeoman: 2.0.0
yarn: 0.27.5
Entity configuration(s) entityName.json files generated in the .jhipster directory
N/A
Browsers and Operating System
Linux Mint 18.2 Sonya Linux 4.8.0-53-generic #56~16.04.1-Ubuntu SMP Tue May 16 01:18:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
- Checking this box is mandatory (this is just to show you read everything)
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 27 (18 by maintainers)
Commits related to this issue
- install aws-sdk locally instead of in generator-jhipster folder Fix #6316 — committed to ruddell/generator-jhipster by ruddell 7 years ago
~~probably missing install part here for Yarn: https://github.com/jhipster/generator-jhipster/blob/master/generators/aws/lib/aws.js#L17~~
EDIT: forgot this comment
The reason was that’s how our AWS docs originally directed with npm, not a good reason 😛. I didn’t know
yarn add aws-sdkornpm install aws-sdkwas enough, thank you.I think first step is to make aws sdk installation not silent, this way user can understand what’s wrong and report it. Similar approach as jhipster upgrade
So maybe we should update the doc and do a check? Installing through the sub generator isn’t a great idea, it’s going to depend wether you use Yarn or NPM.
Running the commands like below works well:
then
jhipster awsworks as well.