Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import #65

Open
eanunezt opened this issue Apr 13, 2023 · 4 comments
Open

Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import #65

eanunezt opened this issue Apr 13, 2023 · 4 comments

Comments

@eanunezt
Copy link

Please Help me with this error:

Welcome to JHipster v7.9.3

WARNING! --blueprint option is deprecated. Please use --blueprints instead
DEBUG! No blueprint found for blueprint generator-jhipster-primeng-blueprint and app with namespace jhipster-primeng-blueprint:app subgenerator: falling back to default generator
Application files will be generated in folder: /home/jhipster/app2/myapp1


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)
? What is the base name of your application? myapp1
DEBUG! No blueprint found for blueprint generator-jhipster-primeng-blueprint and common with namespace jhipster-primeng-blueprint:common subgenerator: falling back to default generator
✖ An error occured while running jhipster:app#compose
ERROR! Directory import '/home/jhipster/app2/jhipster-primeng-blueprint/node_modules/generator-jhipster/generators/client' is not supported resolving ES modules imported from /home/jhipster/app2/jhipster-primeng-blueprint/generators/client/generator.mjs
root@jhipster:/home/jhipster/app2/myapp1#
Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '/home/jhipster/app2/jhipster-primeng-blueprint/node_modules/generator-jhipster/generators/client' is not supported resolving ES modules imported from /home/jhipster/app2/jhipster-primeng-blueprint/generators/client/generator.mjs
Did you mean to import generator-jhipster/generators/client/index.js?
at new NodeError (node:internal/errors:387:5)
at finalizeResolution (node:internal/modules/esm/resolve:425:17)
at moduleResolve (node:internal/modules/esm/resolve:1006:10)
at defaultResolve (node:internal/modules/esm/resolve:1214:11)
at nextResolve (node:internal/modules/esm/loader:165:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:844:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:431:18)
at ModuleWrap. (node:internal/modules/esm/module_job:76:40)
at link (node:internal/modules/esm/module_job:75:36) {
code: 'ERR_UNSUPPORTED_DIR_IMPORT',
url: 'file:///home/jhipster/app2/jhipster-primeng-blueprint/node_modules/generator-jhipster/generators/client'

@yelhouti
Copy link
Contributor

@eanunezt please use jdl and version of jhipster compatible with this blueprint

@eanunezt
Copy link
Author

Help me, I couldn't create a jhipster project with this blueprint.
Versions:

JHipster v7.9.3
node v16.17.0

Error trace:
root@jhipster:/home/jhipster/labs/app1# jhipster --blueprints primeng-blueprint
INFO! Using bundled JHipster
INFO! No custom sharedOptions found within blueprint: generator-jhipster-primeng-blueprint at /usr/local/lib/node_modules/generator-jhipster-primeng-blueprint
INFO! No custom commands found within blueprint: generator-jhipster-primeng-blueprint at /usr/local/lib/node_modules/generator-jhipster-primeng-blueprint
(node:104) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./lib/util/" in the "exports" field module resolution of the package at /home/jhipster/generator-jhipster/node_modules/yeoman-environment/package.json.
Update this package.json to use a subpath pattern like "./lib/util/*".
(Use node --trace-deprecation ... to show where the warning was created)

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

██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║
╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗
╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝
https://www.jhipster.tech
Welcome to JHipster v7.9.3

Application files will be generated in folder: /home/jhipster/labs/app1


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)
? What is the base name of your application? app1
✖ An error occured while running jhipster:app#compose
ERROR! Directory import '/usr/local/lib/node_modules/generator-jhipster-primeng-blueprint/node_modules/generator-jhipster/generators/client' is not supported resolving ES modules imported from /usr/local/lib/node_modules/generator-jhipster-primeng-blueprint/generators/client/generator.mjs
Did you mean to import generator-jhipster-primeng-blueprint/node_modules/generator-jhipster/generators/client/index.js?
Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '/usr/local/lib/node_modules/generator-jhipster-primeng-blueprint/node_modules/generator-jhipster/generators/client' is not supported resolving ES modules imported from /usr/local/lib/node_modules/generator-jhipster-primeng-blueprint/generators/client/generator.mjs
Did you mean to import generator-jhipster-primeng-blueprint/node_modules/generator-jhipster/generators/client/index.js?
at new NodeError (node:internal/errors:387:5)
at finalizeResolution (node:internal/modules/esm/resolve:425:17)
at moduleResolve (node:internal/modules/esm/resolve:1006:10)
at defaultResolve (node:internal/modules/esm/resolve:1214:11)
at nextResolve (node:internal/modules/esm/loader:165:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:844:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:431:18)
at ModuleWrap. (node:internal/modules/esm/module_job:76:40)
at link (node:internal/modules/esm/module_job:75:36) {
code: 'ERR_UNSUPPORTED_DIR_IMPORT',
url: 'file:///usr/local/lib/node_modules/generator-jhipster-primeng-blueprint/node_modules/generator-jhipster/generators/client'
}
(node:104) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./generators/" in the "exports" field module resolution of the package at /usr/local/lib/node_modules/generator-jhipster-primeng-blueprint/node_modules/generator-jhipster/package.json imported from /usr/local/lib/node_modules/generator-jhipster-primeng-blueprint/generators/client/generator.mjs.
Update this package.json to use a subpath pattern like "./generators/*".

@yelhouti
Copy link
Contributor

you need to use npm link with this fork of jhipster: https://github.com/yelhouti/generator-jhipster/tree/composite-key

@itinterlemd
Copy link

you need to use npm link with this fork of jhipster: https://github.com/yelhouti/generator-jhipster/tree/composite-key

thanks now it is run well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants