Generator-jhipster: Wrong comand line in package.json for postinstall

Created on 4 May 2019  路  8Comments  路  Source: jhipster/generator-jhipster

Overview of the issue

When creating a new monolith app the postinstall command fails with the error:

'.' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: ./node_modules/webdriver-manager/bin/webdriver-manager update --gecko false
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Motivation for or Use Case

The error prevents the correct dependencies setup.

Reproduce the error

Generate a new application using the last version.

Related issues
Suggest a Fix

Not sure if it's related to the environment if not it's just a question of changing the line:

From:
"postinstall": "./node_modules/webdriver-manager/bin/webdriver-manager update --gecko false",

to:
"postinstall": "node ./node_modules/webdriver-manager/bin/webdriver-manager update --gecko false",

JHipster Version(s)

6.0.0

JHipster configuration

{
"generator-jhipster": {
"promptValues": {
"packageName": "com.some.corp",
"nativeLanguage": "en"
},
"jhipsterVersion": "6.0.0",
"applicationType": "monolith",
"baseName": "prices",
"packageName": "com.some.corp",
"packageFolder": "com/some/corp",
"serverPort": "8080",
"authenticationType": "jwt",
"cacheProvider": "ehcache",
"enableHibernateCache": true,
"websocket": "spring-websocket",
"databaseType": "sql",
"devDatabaseType": "h2Memory",
"prodDatabaseType": "mssql",
"searchEngine": "elasticsearch",
"messageBroker": false,
"serviceDiscoveryType": false,
"buildTool": "gradle",
"enableSwaggerCodegen": true,
"jwtSecretKey": "",
"clientFramework": "angularX",
"clientTheme": "journal",
"clientThemeVariant": "primary",
"useSass": true,
"clientPackageManager": "npm",
"testFrameworks": ["gatling", "cucumber", "protractor"],
"jhiPrefix": "jhi",
"entitySuffix": "",
"dtoSuffix": "DTO",
"otherModules": [],
"enableTranslation": true,
"nativeLanguage": "en",
"languages": ["en", "pt-br", "es"]
}
}

Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System

Windows 10

  • [x ] Checking this box is mandatory (this is just to show you read everything)
$100 area

All 8 comments

Looks like related to Windows, as we don't have the issue in our CI with Linux.

Of course, I had this same error on Windows 10. I was generating some test project and encountered this error.

I reproduced the issue with my Windows10 VM. It's an important bug.

Do you want to PR the fix @carloca68 ? Otherwise, I can do it, using your suggestion

I'm adding a bug bounty here, this is important

The fix suggested by @carloca68 works well.
I can PR to apply the fix, but I'd like to let @carloca68 propose a PR so he'll be the author :)

@jdubois : I don't know if you'll have time to make a patch release next week, but I can help or do it my self

@pascalgrimaud yes a patch release is easy now - but do you want to do one just to test?

There are several bugs which need to be fixed first. Then, if you're ok, I'll probably try to do a release this wednesday.

Sorry guys, missed the messages, I've been busy :-(

Thanks for the quick fix.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sdoxsee picture sdoxsee  路  4Comments

SudharakaP picture SudharakaP  路  3Comments

SudharakaP picture SudharakaP  路  3Comments

pascalgrimaud picture pascalgrimaud  路  4Comments

tomj0101 picture tomj0101  路  3Comments