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

Jhipster-migrate fails upgrading from jhipster 8.7.1 to 8.8.0 #30

Open
naris opened this issue Jan 17, 2025 · 2 comments
Open

Jhipster-migrate fails upgrading from jhipster 8.7.1 to 8.8.0 #30

naris opened this issue Jan 17, 2025 · 2 comments

Comments

@naris
Copy link

naris commented Jan 17, 2025

It fails immediately with this error:

    C:\src\totalfact   feature/DAP-61481  jhipster-migrate  22.11.0   9.63s   ✔  15:19:58  

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

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

===================== JHipster Migrate =====================

(node:3832) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)
Welcome to the JHipster Migrate Sub-Generator
This will help migrate your current application codebase
No blueprints detected, skipping check of last blueprint version
✔ created branch jhipster_migrate_source
✔ cleaned up project directory
✔ npm install completed
info Running npx --no -- jhipster --force --skip-install --skip-git --ignore-errors --no-insight --skip-checks
✖ failed to regenerate source application using JHipster current
ERROR! An error occured while running jhipster-migrate:migrate#prepareMigrateBranch
ERROR! ERROR! Command failed with exit code 1: npx --no -- jhipster --force --skip-install --skip-git --ignore-errors --no-insight --skip-checks
Error: Command failed with exit code 1: npx --no -- jhipster --force --skip-install --skip-git --ignore-errors --no-insight --skip-checks
at makeError (file:///C:/Users/murwilso/AppData/Roaming/npm/node_modules/generator-jhipster-migrate/node_modules/yeoman-generator/node_modules/execa/lib/error.js:60:11)
at handlePromise (file:///C:/Users/murwilso/AppData/Roaming/npm/node_modules/generator-jhipster-migrate/node_modules/yeoman-generator/node_modules/execa/index.js:124:26)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async default.regenerate (file:///C:/Users/murwilso/AppData/Roaming/npm/node_modules/generator-jhipster-migrate/generators/migrate/generator.js:584:7)
at async default.prepareMigrateBranch (file:///C:/Users/murwilso/AppData/Roaming/npm/node_modules/generator-jhipster-migrate/generators/migrate/generator.js:326:9)
at async default.executeTask (file:///C:/Users/murwilso/AppData/Roaming/npm/node_modules/generator-jhipster-migrate/node_modules/yeoman-generator/dist/actions/lifecycle.js:258:13)
at async runLoop.add.once (file:///C:/Users/murwilso/AppData/Roaming/npm/node_modules/generator-jhipster-migrate/node_modules/yeoman-environment/dist/environment-base.js:395:17) {
shortMessage: 'Command failed with exit code 1: npx --no -- jhipster --force --skip-install --skip-git --ignore-errors --no-insight --skip-checks',
command: 'npx --no -- jhipster --force --skip-install --skip-git --ignore-errors --no-insight --skip-checks',
escapedCommand: 'npx --no -- jhipster --force --skip-install --skip-git --ignore-errors --no-insight --skip-checks',
exitCode: 1,
signal: undefined,
signalDescription: undefined,
stdout: undefined,
stderr: undefined,
cwd: 'C:\src\totalfact',
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}

@naris naris changed the title Jhipster-migrate fails upgrading form jhipster 8.7.1 to 8.8.0 Jhipster-migrate fails upgrading from jhipster 8.7.1 to 8.8.0 Jan 17, 2025
@naris
Copy link
Author

naris commented Jan 17, 2025

When I tried running the command it attempted to run, it failed due to a missing dependency -- globby:
    C:\src\totalfact   jhipster_migrate_source  npx --no -- jhipster --force --skip-install --skip-git --ignore-errors --no-insight --skip-checks   ERROR  15:25:50  
npm warn using --force Recommended protections disabled.

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

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

(node:22652) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)


Documentation for creating an application is at https://www.jhipster.tech/creating-an-app/

Application files will be generated in folder: C:\src\totalfact


WARNING! ______________________________________________________________________________

JHipster update available: 8.8.0 (current: 8.7.3)

Run npm install -g generator-jhipster to update.


WARNING! Ignoring 'Collection' definitions as it is using a built-in Entity 'user': 'otherEntityRelationshipName' is set with value 'undefined' at relationship 'sharedWith' but no back-reference was found
WARNING! Entity Collection doesn't use DTO. You should check for User data leakage through owner relationship.
WARNING! Entity Collection doesn't use DTO. You should check for User data leakage through sharedWith relationship.
ERROR! An error occured while running jhipster:bootstrap-application-base#loadApplicationKeys
ERROR! ERROR! Named export 'globby' not found. The requested module 'globby' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'globby';
const { globby } = pkg;

file:///C:/src/totalfact/node_modules/generator-jhipster/dist/generators/workspaces/support/applications-lookup.js:21
import { globby } from 'globby';
^^^^^^
SyntaxError: Named export 'globby' not found. The requested module 'globby' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'globby';
const { globby } = pkg;

at ModuleJob._instantiate (node:internal/modules/esm/module_job:177:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:260:5)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:543:26)
at async lookupCommandsConfigs (file:///C:/src/totalfact/node_modules/generator-jhipster/dist/lib/command/lookup-commands-configs.js:16:23)
at async BootstrapApplicationBase.loadApplicationKeys (file:///C:/src/totalfact/node_modules/generator-jhipster/dist/generators/bootstrap-application-base/generator.js:389:38)
at async BootstrapApplicationBase.executeTask (file:///C:/src/totalfact/node_modules/yeoman-generator/dist/actions/lifecycle.js:258:13)
at async runLoop.add.once (file:///C:/src/totalfact/node_modules/yeoman-environment/dist/environment-base.js:395:17)

@naris
Copy link
Author

naris commented Jan 17, 2025

I installed globby using "npm install globby" and then jhipster-migrate worked.
However, it is not optimal to force the end user to debug and install missing npm modules, even though the end users are developers :(

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

1 participant