jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.47k stars 4.02k forks source link

No such file or directory during initial generation #11821

Closed MBurchard closed 4 years ago

MBurchard commented 4 years ago
Overview of the issue
jhipster --yarn --blueprints vuejs

INFO! Using JHipster version installed globally                                                                                      

> ejs@2.7.4 postinstall d:\Martin\Entwicklung\TeleNetz\.yo-repository\node_modules\generator-jhipster-vuejs\node_modules\mem-fs-edito
r\node_modules\ejs                                                                                                                   
> node ./postinstall.js                                                                                                              

> ejs@3.1.2 postinstall d:\Martin\Entwicklung\TeleNetz\.yo-repository\node_modules\generator-jhipster-vuejs\node_modules\ejs         
> node --harmony ./postinstall.js                                                                                                    

> spawn-sync@1.0.15 postinstall d:\Martin\Entwicklung\TeleNetz\.yo-repository\node_modules\generator-jhipster-vuejs\node_modules\spaw
n-sync                                                                                                                               
> node postinstall                                                                                                                   

+ generator-jhipster-vuejs@1.8.0                                                                                                     
added 709 packages from 492 contributors in 15.884s                                                                                  
√ generator-jhipster-vuejs installed.                                                                                                
INFO! No custom sharedOptions found within blueprint: generator-jhipster-vuejs at d:/Martin/Entwicklung/TeleNetz/.yo-repository/node_
modules/generator-jhipster-vuejs                                                                                                     
INFO! No custom commands found within blueprint: generator-jhipster-vuejs at d:/Martin/Entwicklung/TeleNetz/.yo-repository/node_modul
es/generator-jhipster-vuejs                                                                                                          
INFO! Running default command                                                                                                        
INFO! Executing jhipster:app                                                                                                         
INFO! Options: yarn: true, blueprints: vuejs, from-cli: true                                                                         

        ██╗ ██╗   ██╗ ████████╗ ███████╗   ██████╗ ████████╗ ████████╗ ███████╗                                                      
        ██║ ██║   ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗                                                     
        ██║ ████████║    ██║    ███████╔╝ ╚█████╗     ██║    ██████╗   ███████╔╝                                                     
  ██╗   ██║ ██╔═══██║    ██║    ██╔════╝   ╚═══██╗    ██║    ██╔═══╝   ██╔══██║                                                      
  ╚██████╔╝ ██║   ██║ ████████╗ ██║       ██████╔╝    ██║    ████████╗ ██║  ╚██╗                                                     
   ╚═════╝  ╚═╝   ╚═╝ ╚═══════╝ ╚═╝       ╚═════╝     ╚═╝    ╚═══════╝ ╚═╝   ╚═╝                                                     

                            https://www.jhipster.tech                                                                                

Welcome to JHipster v6.9.0
Application files will be generated in folder: d:\Martin\Entwicklung\TeleNetz
 _______________________________________________________________________________________________________________

  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
 _______________________________________________________________________________________________________________

? Which *type* of application would you like to create? Monolithic application (recommended for simple projects)
? [Beta] Do you want to make it reactive with Spring WebFlux? No
? What is the base name of your application? TeleNetz
? What is your default Java package name? de.mbur.telenetz
? Do you want to use the JHipster Registry to configure, monitor and scale your application? No
? Which *type* of authentication would you like to use? JWT authentication (stateless, with a token)
? Which *type* of database would you like to use? SQL (H2, MySQL, MariaDB, PostgreSQL, Oracle, MSSQL)
? Which *production* database would you like to use? MariaDB
? Which *development* database would you like to use? H2 with disk-based persistence
? Do you want to use the Spring cache abstraction? Yes, with the Caffeine implementation (local cache, for a single node)
? Do you want to use Hibernate 2nd level cache? Yes
? Would you like to use Maven or Gradle for building the backend? Gradle
? Which other technologies would you like to use? WebSockets using Spring Websocket
     info Using blueprint generator-jhipster-vuejs for client subgenerator
? Which *Framework* would you like to use for the client? Vue.js
? Would you like to use a Bootswatch theme (https://bootswatch.com/)? Spacelab
? Choose a Bootswatch variant navbar theme (https://bootswatch.com/)? Light
     info Using blueprint generator-jhipster-vuejs for common subgenerator
? Would you like to enable internationalization support? Yes
? Please choose the native language of the application German
? Please choose additional languages to install English
? Besides JUnit and Jest, which testing frameworks would you like to use?
? Would you like to install other generators from the JHipster Marketplace? No
     info Using blueprint generator-jhipster-vuejs for languages subgenerator

Installing languages: de, en
Git repository initialized.

KeyStore 'src/main/resources/config/tls/keystore.p12' generated successfully.

events.js:287
      throw er; // Unhandled 'error' event
      ^

Error: Copying template C:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\generator-jhipster\generators\server\templates/src/test/java/package/security/SecurityUtilsUnitTest.java.ejs failed. [Error: ENOENT: no such file or directory, open 'C:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\generator-jhipster\generators\server\templates\src\test\java\package\security\SecurityUtilsUnitTest.java.ejs']
    at module.exports.error (C:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\generator-jhipster\generators\generator-base.js:1590:15)
    at C:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\generator-jhipster\generators\utils.js:256:23
    at tryHandleCache (C:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\generator-jhipster\node_modules\ejs\lib\ejs.js:275:14)
    at Object.exports.renderFile (C:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\generator-jhipster\node_modules\ejs\lib\ejs.js:478:10)
    at Object.renderContent (C:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\generator-jhipster\generators\utils.js:252:9)
    at module.exports.template (C:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\generator-jhipster\generators\generator-base-private.js:769:23)
    at C:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\generator-jhipster\generators\generator-base.js:2040:42
    at Array.forEach (<anonymous>)
    at module.exports.writeFilesToDisk (C:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\generator-jhipster\generators\generator-base.js:2002:45)
    at module.exports.writeFiles (C:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\generator-jhipster\generators\server\files.js:2020:18)
Emitted 'error' event on  instance at:
    at Immediate.<anonymous> (C:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\yeoman-generator\lib\index.js:924:20)
    at processImmediate (internal/timers.js:456:21)

I checked the directory: c:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\generator-jhipster\generators\server\templates\src\
It contains a main folder but no test folder.

Browsers and Operating System

Windows 10

mraible commented 4 years ago

Can you try generating your app in a directory without spaces in the path?

On May 19, 2020, at 06:01, Martin Burchard notifications@github.com wrote:

 Overview of the issue

jhipster --yarn --blueprints vuejs

INFO! Using JHipster version installed globally

ejs@2.7.4 postinstall d:\Martin\Entwicklung\TeleNetz.yo-repository\node_modules\generator-jhipster-vuejs\node_modules\mem-fs-edito r\node_modules\ejs
node ./postinstall.js

ejs@3.1.2 postinstall d:\Martin\Entwicklung\TeleNetz.yo-repository\node_modules\generator-jhipster-vuejs\node_modules\ejs
node --harmony ./postinstall.js

spawn-sync@1.0.15 postinstall d:\Martin\Entwicklung\TeleNetz.yo-repository\node_modules\generator-jhipster-vuejs\node_modules\spaw n-sync
node postinstall

  • generator-jhipster-vuejs@1.8.0
    added 709 packages from 492 contributors in 15.884s
    √ generator-jhipster-vuejs installed.
    INFO! No custom sharedOptions found within blueprint: generator-jhipster-vuejs at d:/Martin/Entwicklung/TeleNetz/.yo-repository/node_ modules/generator-jhipster-vuejs
    INFO! No custom commands found within blueprint: generator-jhipster-vuejs at d:/Martin/Entwicklung/TeleNetz/.yo-repository/node_modul es/generator-jhipster-vuejs
    INFO! Running default command
    INFO! Executing jhipster:app
    INFO! Options: yarn: true, blueprints: vuejs, from-cli: true

    ██╗ ██╗   ██╗ ████████╗ ███████╗   ██████╗ ████████╗ ████████╗ ███████╗                                                      
    ██║ ██║   ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗                                                     
    ██║ ████████║    ██║    ███████╔╝ ╚█████╗     ██║    ██████╗   ███████╔╝                                                     

    ██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║
    ╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗
    ╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝

                        https://www.jhipster.tech                                                                                

Welcome to JHipster v6.9.0 Application files will be generated in folder: d:\Martin\Entwicklung\TeleNetz


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


? Which type of application would you like to create? Monolithic application (recommended for simple projects) ? [Beta] Do you want to make it reactive with Spring WebFlux? No ? What is the base name of your application? TeleNetz ? What is your default Java package name? de.mbur.telenetz ? Do you want to use the JHipster Registry to configure, monitor and scale your application? No ? Which type of authentication would you like to use? JWT authentication (stateless, with a token) ? Which type of database would you like to use? SQL (H2, MySQL, MariaDB, PostgreSQL, Oracle, MSSQL) ? Which production database would you like to use? MariaDB ? Which development database would you like to use? H2 with disk-based persistence ? Do you want to use the Spring cache abstraction? Yes, with the Caffeine implementation (local cache, for a single node) ? Do you want to use Hibernate 2nd level cache? Yes ? Would you like to use Maven or Gradle for building the backend? Gradle ? Which other technologies would you like to use? WebSockets using Spring Websocket info Using blueprint generator-jhipster-vuejs for client subgenerator ? Which Framework would you like to use for the client? Vue.js ? Would you like to use a Bootswatch theme (https://bootswatch.com/)? Spacelab ? Choose a Bootswatch variant navbar theme (https://bootswatch.com/)? Light info Using blueprint generator-jhipster-vuejs for common subgenerator ? Would you like to enable internationalization support? Yes ? Please choose the native language of the application German ? Please choose additional languages to install English ? Besides JUnit and Jest, which testing frameworks would you like to use? ? Would you like to install other generators from the JHipster Marketplace? No info Using blueprint generator-jhipster-vuejs for languages subgenerator

Installing languages: de, en Git repository initialized.

KeyStore 'src/main/resources/config/tls/keystore.p12' generated successfully.

events.js:287 throw er; // Unhandled 'error' event ^

Error: Copying template C:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\generator-jhipster\generators\server\templates/src/test/java/package/security/SecurityUtilsUnitTest.java.ejs failed. [Error: ENOENT: no such file or directory, open 'C:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\generator-jhipster\generators\server\templates\src\test\java\package\security\SecurityUtilsUnitTest.java.ejs'] at module.exports.error (C:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\generator-jhipster\generators\generator-base.js:1590:15) at C:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\generator-jhipster\generators\utils.js:256:23 at tryHandleCache (C:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\generator-jhipster\node_modules\ejs\lib\ejs.js:275:14) at Object.exports.renderFile (C:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\generator-jhipster\node_modules\ejs\lib\ejs.js:478:10) at Object.renderContent (C:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\generator-jhipster\generators\utils.js:252:9) at module.exports.template (C:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\generator-jhipster\generators\generator-base-private.js:769:23) at C:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\generator-jhipster\generators\generator-base.js:2040:42 at Array.forEach () at module.exports.writeFilesToDisk (C:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\generator-jhipster\generators\generator-base.js:2002:45) at module.exports.writeFiles (C:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\generator-jhipster\generators\server\files.js:2020:18) Emitted 'error' event on instance at: at Immediate. (C:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\yeoman-generator\lib\index.js:924:20) at processImmediate (internal/timers.js:456:21) I checked the directory: c:\Users\Martin Burchard\AppData\Local\Yarn\Data\global\node_modules\generator-jhipster\generators\server\templates\src\ It contains a main folder but no test folder.

Browsers and Operating System

Windows 10

Checking this box is mandatory (this is just to show you read everything) — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

MBurchard commented 4 years ago
Application files will be generated in folder: d:\Martin\Entwicklung\TeleNetz

As one can see, the path is without spaces

MBurchard commented 4 years ago

The same error also occurs under Linux Mint 19.3

jhipster --yarn --blueprints vuejs
INFO! Using JHipster version installed globally

> ejs@2.7.4 postinstall /home/mburchard/Entwicklung/TeleNetz/.yo-repository/lib/node_modules/generator-jhipster-vuejs/node_modules/mem-fs-editor/node_modules/ejs
> node ./postinstall.js

> ejs@3.1.2 postinstall /home/mburchard/Entwicklung/TeleNetz/.yo-repository/lib/node_modules/generator-jhipster-vuejs/node_modules/ejs
> node --harmony ./postinstall.js

> spawn-sync@1.0.15 postinstall /home/mburchard/Entwicklung/TeleNetz/.yo-repository/lib/node_modules/generator-jhipster-vuejs/node_modules/spawn-sync
> node postinstall

+ generator-jhipster-vuejs@1.8.0
added 709 packages from 492 contributors in 28.222s
✔ generator-jhipster-vuejs installed.
INFO! No custom sharedOptions found within blueprint: generator-jhipster-vuejs at /home/mburchard/Entwicklung/TeleNetz/.yo-repository/lib/node_modules/generator-jhipster-vuejs
INFO! No custom commands found within blueprint: generator-jhipster-vuejs at /home/mburchard/Entwicklung/TeleNetz/.yo-repository/lib/node_modules/generator-jhipster-vuejs
INFO! Running default command
INFO! Executing jhipster:app
INFO! Options: yarn: true, blueprints: vuejs, from-cli: true

        ██╗ ██╗   ██╗ ████████╗ ███████╗   ██████╗ ████████╗ ████████╗ ███████╗
        ██║ ██║   ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
        ██║ ████████║    ██║    ███████╔╝ ╚█████╗     ██║    ██████╗   ███████╔╝
  ██╗   ██║ ██╔═══██║    ██║    ██╔════╝   ╚═══██╗    ██║    ██╔═══╝   ██╔══██║
  ╚██████╔╝ ██║   ██║ ████████╗ ██║       ██████╔╝    ██║    ████████╗ ██║  ╚██╗
   ╚═════╝  ╚═╝   ╚═╝ ╚═══════╝ ╚═╝       ╚═════╝     ╚═╝    ╚═══════╝ ╚═╝   ╚═╝

                            https://www.jhipster.tech

Welcome to JHipster v6.9.0
Application files will be generated in folder: /home/mburchard/Entwicklung/TeleNetz
 _______________________________________________________________________________________________________________

  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
 _______________________________________________________________________________________________________________

? Which *type* of application would you like to create? Monolithic application (recommended for simple projects)
? [Beta] Do you want to make it reactive with Spring WebFlux? No
? What is the base name of your application? TeleNetz
? What is your default Java package name? de.mbur.telenetz
? Do you want to use the JHipster Registry to configure, monitor and scale your application? No
? Which *type* of authentication would you like to use? JWT authentication (stateless, with a token)
? Which *type* of database would you like to use? SQL (H2, MySQL, MariaDB, PostgreSQL, Oracle, MSSQL)
? Which *production* database would you like to use? MariaDB
? Which *development* database would you like to use? H2 with disk-based persistence
? Do you want to use the Spring cache abstraction? Yes, with the Caffeine implementation (local cache, for a single node)
? Do you want to use Hibernate 2nd level cache? Yes
? Would you like to use Maven or Gradle for building the backend? Gradle
? Which other technologies would you like to use? WebSockets using Spring Websocket
     info Using blueprint generator-jhipster-vuejs for client subgenerator
? Which *Framework* would you like to use for the client? Vue.js
? Would you like to use a Bootswatch theme (https://bootswatch.com/)? Spacelab
? Choose a Bootswatch variant navbar theme (https://bootswatch.com/)? Light
     info Using blueprint generator-jhipster-vuejs for common subgenerator
? Would you like to enable internationalization support? Yes
? Please choose the native language of the application German
? Please choose additional languages to install English
? Besides JUnit and Jest, which testing frameworks would you like to use? 
? Would you like to install other generators from the JHipster Marketplace? No
     info Using blueprint generator-jhipster-vuejs for languages subgenerator

Installing languages: de, en
Git repository initialized.
Generating 2.048 bit RSA key pair and self-signed certificate (SHA256withRSA) with a validity of 99.999 days
        for: CN=Java Hipster, OU=Development, O=de.mbur.telenetz, L=, ST=, C=

KeyStore 'src/main/resources/config/tls/keystore.p12' generated successfully.

events.js:287
      throw er; // Unhandled 'error' event
      ^

Error: Copying template /home/mburchard/.config/yarn/global/node_modules/generator-jhipster/generators/server/templates/src/test/java/package/security/SecurityUtilsUnitTest.java.ejs failed. [Error: ENOENT: no such file or directory, open '/home/mburchard/.config/yarn/global/node_modules/generator-jhipster/generators/server/templates/src/test/java/package/security/SecurityUtilsUnitTest.java.ejs']
    at module.exports.error (/home/mburchard/.config/yarn/global/node_modules/generator-jhipster/generators/generator-base.js:1590:15)
    at /home/mburchard/.config/yarn/global/node_modules/generator-jhipster/generators/utils.js:256:23
    at tryHandleCache (/home/mburchard/.config/yarn/global/node_modules/generator-jhipster/node_modules/ejs/lib/ejs.js:275:14)
    at Object.exports.renderFile (/home/mburchard/.config/yarn/global/node_modules/generator-jhipster/node_modules/ejs/lib/ejs.js:478:10)
    at Object.renderContent (/home/mburchard/.config/yarn/global/node_modules/generator-jhipster/generators/utils.js:252:9)
    at module.exports.template (/home/mburchard/.config/yarn/global/node_modules/generator-jhipster/generators/generator-base-private.js:769:23)
    at /home/mburchard/.config/yarn/global/node_modules/generator-jhipster/generators/generator-base.js:2040:42
    at Array.forEach (<anonymous>)
    at module.exports.writeFilesToDisk (/home/mburchard/.config/yarn/global/node_modules/generator-jhipster/generators/generator-base.js:2002:45)
    at module.exports.writeFiles (/home/mburchard/.config/yarn/global/node_modules/generator-jhipster/generators/server/files.js:2020:18)
Emitted 'error' event on  instance at:
    at Immediate.<anonymous> (/home/mburchard/.config/yarn/global/node_modules/yeoman-generator/lib/index.js:924:20)
    at processImmediate (internal/timers.js:456:21)
MBurchard commented 4 years ago

It seems to be yarn related. With NPM the generation works. Tested with Linux Mint

MathieuAA commented 4 years ago

Can you reinstall JHipster with yarn? This is weird...

MBurchard commented 4 years ago

It was a fresh install on both systems. Have never used jhipster before on that machine and followed the guide...

It was also independent from the --blueprints option

yarn global add yo
yarn global add generator-jhipster

jhipster --yarn
vishal423 commented 4 years ago

can you try removing the global yo module? I think that's not required anymore and needs a doc update

MBurchard commented 4 years ago

this fixes it with Linux Mint. Without yo everything works fine. I'll test that with Windows 10 to