jhipster / jhipster-dotnetcore

JHipster.NET blueprint
Apache License 2.0
315 stars 93 forks source link

when I use command jhipster --blueprints dotnetcore get error Unhandled promise rejection at: #876

Closed MrWYG closed 3 years ago

MrWYG commented 3 years ago
Overview of the issue

Unhandled promise rejection at: ReferenceError: C:\Users\15383\AppData\Roaming\npm\node_modules\generator-jhipster\generators\client\templates\react\package.json.ejs:22 20| "name": "<%= dasherizedBaseName %>", 21| "version": "0.0.1-SNAPSHOT",

22| "description": "<%= projectDescription %>", 23| "private": true, 24| "license": "UNLICENSED", 25| "cacheDirectories": [

projectDescription is not defined

Motivation for or Use Case

jhipster --blueprints dotnetcore

Reproduce the error

Re-Steps: ? What is the base name of your application? Project ? What is your default C# namespace? Project ? Which type of application would you like to create? Monolithic application (recommended for simple projects) info Using blueprint generator-jhipster-dotnetcore for common subgenerator info Using blueprint generator-jhipster-dotnetcore for server subgenerator info Using blueprint generator-jhipster-dotnetcore for client subgenerator info Using blueprint generator-jhipster-dotnetcore for languages subgenerator ? On which port would like your server to run ? It should be unique to avoid port conflicts (choose http -> https=httpPo rt+1). 5000 ? Do you want to use the CQRS design pattern? Yes ? Which database do you want to use PostgreSQL ? Which type of authentication would you like to use? JWT authentication (stateless, with a token) ? Which Framework would you like to use for the client? React ? Would you like to use a Bootswatch theme (https://bootswatch.com/)? Default JHipster ? Would you like to enable internationalization support? No ? Please choose the native language of the application Chinese (Simplified) ? Besides JUnit and Jest, which testing frameworks would you like to use? ? Would you like to install other generators from the JHipster Marketplace? No Unhandled promise rejection at:

Suggest a Fix

I don't know how to fix.

JHipster Version(s)

7.1.0

JHipster configuration

as shown in steps before others: system : windows 10 professional x64 npm-v: 8.1.2 node: v16.13.0 JHipster.NET: v3.1.1 JHipster : 7.1.0

Browsers and Operating System

system : windows 10 professional x64

nicolas63 commented 3 years ago

@MrWYG, sorry but with the same configuration i not have this error, can you give me your .yo-rc.json (this file is in root folder)

MrWYG commented 3 years ago
  1. the filepath I found: AppData\Roaming\npm\node_modules\generator-jhipster-dotnetcore\node_modules\jhipster-core\test\test_files\jhipster_app
  2. the content: { "generator-jhipster": { "jhipsterVersion": "3.7.1", "baseName": "standard", "packageName": "com.mycompany.myapp", "packageFolder": "com/mycompany/myapp", "serverPort": "8080", "authenticationType": "session", "hibernateCache": "ehcache", "clusteredHttpSession": false, "websocket": false, "databaseType": "sql", "devDatabaseType": "h2Memory", "prodDatabaseType": "postgresql", "searchEngine": false, "buildTool": "gradle", "enableSocialSignIn": false, "rememberMeKey": "MTBlZDY1OTk5Yjc2MjRkZDY3ZDkwZTE1ZWY1Nzg5MTQ0NWU0MjA4OTcxZDMyMTUzZTcxOGFhM2UwMWIyYjlkZmQ3OTljZTkwNThlYmViZDM0M2Y2OWFiM2JhNWY5ZDZkYzBhODg3ZDkwOGQyYmY1ZTFiYzFkNDhkNjhjZGFmNDE=", "useSass": false, "applicationType": "monolith", "testFrameworks": [], "jhiPrefix": "jhi", "enableTranslation": true, "nativeLanguage": "en", "languages": [ "en" ], "skipUserManagement": true, "skipClient": true, "skipServer": true } }
nicolas63 commented 3 years ago

There is no .yo-rc in the folder where you generate the application ?

MrWYG commented 3 years ago

I think that is Self-contained. below is the detail when I install generator-jhipster-dotnetcore: npm install -g generator-jhipster-dotnetcore npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated uuid@3.3.2: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.

changed 709 packages, and audited 710 packages in 7m

72 packages are looking for funding run npm fund for details

9 vulnerabilities (5 moderate, 4 high)

To address all issues possible (including breaking changes), run: npm audit fix --force

Some issues need review, and may require choosing a different dependency.

Run npm audit for details.

MrWYG commented 3 years ago

I didn't generate any application because when I generate an application there is error catched.

nicolas63 commented 3 years ago

do you have the possibility to reproduce on another computer ? Sorry but i can't reproduce

MrWYG commented 3 years ago

Could you provide me what version you have installed about Node.js and OpenJKD/Java JDK?

nicolas63 commented 3 years ago

you don't need jdk and for npm i have 8.1.2 and node 16.13.0 like you

nicolas63 commented 3 years ago

In wich folder do you run jhipster --blueprints dotnetcore ?

MrWYG commented 3 years ago

I tried driver C and E, both not work .

MrWYG commented 3 years ago

I'm having the same problem with another computer. I want to make sure my steps are correct as shown below:

  1. Install Node.js;
  2. execute command: npm install -g generator-jhipster
  3. execute command: npm install -g generator-jhipster-dotnetcore
  4. call the generator: jhipster --blueprints dotnetcore Am I right?
nicolas63 commented 3 years ago

yes exactly just you need to use generator-jhipster version 7.1

MrWYG commented 3 years ago

Thank you very much for you help, it works.

nicolas63 commented 3 years ago

@MrWYG what is resolution ? Just jhipster version ?

MrWYG commented 3 years ago

Yes, use generator-jhipster version 7.1.0 is OK.

gaetandezeiraud commented 2 years ago

Same problem here. Confirm use generator-jhipster version 7.1.0 is the solution! Thanks.