You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you install the latest stable version of jhipster that's 7.9.3 via npm and try to execute jhipster cli or jhipster jdl <file.jdl> it's returning the error:
node:internal/modules/cjs/loader:573
throw e;
^
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/util/namespace' is not defined by "exports" in /home/$USER/.nvm/versions/node/v18.16.1/lib/node_modules/generator-jhipster/node_modules/yeoman-environment/package.json
at new NodeError (node:internal/errors:399:5)
at exportsNotFound (node:internal/modules/esm/resolve:361:10)
at packageExportsResolve (node:internal/modules/esm/resolve:697:9)
at resolveExports (node:internal/modules/cjs/loader:567:36)
at Module._findPath (node:internal/modules/cjs/loader:636:31)
at Module._resolveFilename (node:internal/modules/cjs/loader:1063:27)
at Module._load (node:internal/modules/cjs/loader:922:27)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:110:18)
at Object.<anonymous> (/home/$USER/.nvm/versions/node/v18.16.1/lib/node_modules/generator-jhipster/utils/blueprint.js:19:25) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
Edit the file in /home/$USER/.nvm/versions/node/v18.16.1/lib/node_modules/generator-jhipster/node_modules/yeoman-environment/package.json and add this code into the "exports":
Overview of the issue
When you install the latest stable version of jhipster that's 7.9.3 via npm and try to execute jhipster cli or jhipster jdl <file.jdl> it's returning the error:
npm i -g [email protected]
jhipster
And got the error.
Suggest a Fix
Edit the file in /home/$USER/.nvm/versions/node/v18.16.1/lib/node_modules/generator-jhipster/node_modules/yeoman-environment/package.json and add this code into the "exports":
JHipster Version(s)
[email protected]
NodeJS Versions(s)
node v18.16.1
Java Version(s)
openjdk 11.0.12 2021-07-20
OpenJDK Runtime Environment 18.9 (build 11.0.12+7)
OpenJDK 65-Bit Server VM 18.9 (build 11.0.12+7, mixed mode)
The text was updated successfully, but these errors were encountered: