jhipster / jhipster-kotlin

Kotlin based JHipster
https://khipster.dev
Apache License 2.0
455 stars 95 forks source link

followed the instructions to install via npm and failing on run #434

Open elijulian opened 3 months ago

elijulian commented 3 months ago

Overview of the issue

i ran npm install -g generator-jhipster-kotlin and then khipster and am getting the following output:

node:internal/modules/cjs/loader:599
      throw e;
      ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './cli/utils' is not defined by "exports" in /Users/eli.julian/.nvm/versions/node/v20.16.0/lib/node_modules/generator-jhipster-kotlin/node_modules/generator-jhipster/package.json
    at exportsNotFound (node:internal/modules/esm/resolve:304:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:651:9)
    at resolveExports (node:internal/modules/cjs/loader:592:36)
    at Module._findPath (node:internal/modules/cjs/loader:669:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1131:27)
    at Module._load (node:internal/modules/cjs/loader:986:27)
    at Module.require (node:internal/modules/cjs/loader:1233:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/Users/eli.julian/.nvm/versions/node/v20.16.0/lib/node_modules/generator-jhipster-kotlin/cli/khipster.js:22:20)
    at Module._compile (node:internal/modules/cjs/loader:1358:14) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

worthy to note that this is on a mac M1

Reproduce the error

Related issues

Link to PR (if any)

KHipster Version(s)

fhchina commented 2 months ago

Totally same error:

fhchina commented 2 months ago

➜ hellokhipster khipster node:internal/modules/cjs/loader:598 throw e; ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './cli/utils' is not defined by "exports" in /Users/fanghao/.nvm/versions/node/v20.11.0/lib/node_modules/generator-jhipster-kotlin/node_modules/generator-jhipster/package.json at exportsNotFound (node:internal/modules/esm/resolve:303:10) at packageExportsResolve (node:internal/modules/esm/resolve:650:9) at resolveExports (node:internal/modules/cjs/loader:591:36) at Module._findPath (node:internal/modules/cjs/loader:668:31) at Module._resolveFilename (node:internal/modules/cjs/loader:1130:27) at Module._load (node:internal/modules/cjs/loader:985:27) at Module.require (node:internal/modules/cjs/loader:1235:19) at require (node:internal/modules/helpers:176:18) at Object. (/Users/fanghao/.nvm/versions/node/v20.11.0/lib/node_modules/generator-jhipster-kotlin/cli/khipster.js:22:20) at Module._compile (node:internal/modules/cjs/loader:1376:14) { code: 'ERR_PACKAGE_PATH_NOT_EXPORTED' }

Node.js v20.11.0

mraible commented 2 months ago

I believe you have to use Node 16 to workaround this issue.

ikiddoi commented 1 month ago

same error changing to node 16 works