Giter VIP home page Giter VIP logo

Comments (6)

julillosamaral avatar julillosamaral commented on May 23, 2024

I have the exact same issue!

from generator-jhipster.

mraible avatar mraible commented on May 23, 2024

Can you please try the JHipster Migrate Blueprint and see if it solves your problem? It worked for me!

from generator-jhipster.

julillosamaral avatar julillosamaral commented on May 23, 2024

@mraible Didn't work using jhipster-migrate, I installed as indicated and executed jhipster-migrate and the output I got was

Welcome to the JHipster Migrate Sub-Generator
This will help migrate your current application codebase
✔ created branch jhipster_migrate_source
✔ cleaned up project directory
⠋ regenerating source application Running local npx jhipster --force --skip-install --skip-git --ignore-errors --no-insight --skip-checks --with-entities --prefer-global
✖ successfully regenerated source application using JHipster current
ERROR! An error occured while running jhipster-migrate:migrate#prepareMigrateBranch
ERROR! ERROR! Command failed with exit code 1: npx jhipster --force --skip-install --skip-git --ignore-errors --no-insight --skip-checks --with-entities --prefer-global
Error: Command failed with exit code 1: npx jhipster --force --skip-install --skip-git --ignore-errors --no-insight --skip-checks --with-entities --prefer-global
    at makeError (file:///Users/julio/.nvm/versions/node/v18.16.0/lib/node_modules/generator-jhipster-migrate/node_modules/execa/lib/error.js:60:11)
    at handlePromise (file:///Users/julio/.nvm/versions/node/v18.16.0/lib/node_modules/generator-jhipster-migrate/node_modules/execa/index.js:124:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async default.regenerate (file:///Users/julio/.nvm/versions/node/v18.16.0/lib/node_modules/generator-jhipster-migrate/generators/migrate/generator.js:529:9)
    at async default.prepareMigrateBranch (file:///Users/julio/.nvm/versions/node/v18.16.0/lib/node_modules/generator-jhipster-migrate/generators/migrate/generator.js:322:11)
    at async default.executeTask (file:///Users/julio/.nvm/versions/node/v18.16.0/lib/node_modules/generator-jhipster-migrate/node_modules/yeoman-generator/dist/actions/lifecycle.js:244:13)
    at async runLoop.add.once (file:///Users/julio/.nvm/versions/node/v18.16.0/lib/node_modules/generator-jhipster-migrate/node_modules/yeoman-environment/dist/environment-base.js:381:17) {
  shortMessage: 'Command failed with exit code 1: npx jhipster --force --skip-install --skip-git --ignore-errors --no-insight --skip-checks --with-entities --prefer-global',
  command: 'npx jhipster --force --skip-install --skip-git --ignore-errors --no-insight --skip-checks --with-entities --prefer-global',
  escapedCommand: 'npx jhipster --force --skip-install --skip-git --ignore-errors --no-insight --skip-checks --with-entities --prefer-global',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: undefined,
  stderr: undefined,
  cwd: '/Users/julio/Projects/jhipster_migration/backend',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

Not sure if I should move this error to the repo from JHipster Migrate Blueprint or leave it here.

I tried using -d, --debug to get a better output but it was the same as the one I just shared, is there any other flag to use?

I also tried creating a new branch and executing: npx jhipster --force --skip-install --skip-git --ignore-errors --no-insight --skip-checks --with-entities --prefer-global and got the following

INFO! Using bundled JHipster
node:internal/modules/cjs/loader:571
      throw e;
      ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/util/namespace' is not defined by "exports" in /Users/julio/Projects/jhipster_migration/backend/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:565:36)
    at Module._findPath (node:internal/modules/cjs/loader:634:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1061:27)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/Users/julio/Projects/jhipster_migration/backend/node_modules/generator-jhipster/utils/blueprint.js:19:25) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Node.js v18.16.0

from generator-jhipster.

mraible avatar mraible commented on May 23, 2024

Can you please try it with Node 16 since that is what JHipster 7 requires?

from generator-jhipster.

mshima avatar mshima commented on May 23, 2024

You can try:

  • change jhipsterVersion 7.9.3 to 7.9.4 at .yo-rc.json file.
  • use jhipster-migrate --verbose this will pause the generation process step by step.
    In another terminal install node 16 when regenerating the application, and install node 18 when generating the upgrade application.
    I use n to manage node version, but you can use other tool like nvm.

from generator-jhipster.

julillosamaral avatar julillosamaral commented on May 23, 2024

Hello,

A merge between the two suggestions worked.

I had to use JHipster Migrate Blueprint, @mraible is this the new standard way to do the update? I was not aware of it.

I also used Node 16 instead of Node 18 and updated on the .yo-rc.json from 7.9.3 to 7.9.4.
Didn't use your second suggestion @mshima

One extra thing I had to do was fixing a mapping on an entity, someone left a relation repeated and that was failing too.

Thanks for your help guys!

from generator-jhipster.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.