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.
The error prevents the correct dependencies setup.
Generate a new application using the last version.
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",
6.0.0
{
"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"]
}
}
entityName.json files generated in the .jhipster directoryWindows 10
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.