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

Node Version Manager: interferes with Quinoa #775

Open
DaiYuANg opened this issue Sep 23, 2024 · 15 comments
Open

Node Version Manager: interferes with Quinoa #775

DaiYuANg opened this issue Sep 23, 2024 · 15 comments
Labels
enhancement New feature or request

Comments

@DaiYuANg
Copy link

Describe the bug

Here is fedora and nvm environment. Also setting nvm environment for bash.
In my terminal using bash or sh pnpm is found but when start in ide there is log

024-09-24 01:37:21,728 INFO  [io.qua.qui.dep.fra.FrameworkType] (build-38) Quinoa detected 'VITE' frameworkType from package.json file.
2024-09-24 01:37:21,965 INFO  [io.qua.qui.dep.QuinoaProcessor] (build-17) Fresh Quinoa build, let's install packages...
2024-09-24 01:37:21,968 INFO  [io.qua.qui.dep.pac.PackageManagerRunner] (build-17) Running Quinoa package manager install command: pnpm install
2024-09-24 01:37:21,971 INFO  [io.qua.qui.dep.pac.PackageManagerRunner] (build-17) sh: line 1: pnpm: command not found
 Failed to start quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkiverse.quinoa.deployment.QuinoaProcessor#install threw an exception: java.lang.RuntimeException: Error in Quinoa while running package manager install command: pnpm install
	at io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner.install(PackageManagerRunner.java:86)
	at io.quarkiverse.quinoa.deployment.QuinoaProcessor.install(QuinoaProcessor.java:145)
	at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733)
	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:856)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
	at java.base/java.lang.Thread.run(Thread.java:1583)
	at org.jboss.threads.JBossThread.run(JBossThread.java:483)

	at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:354)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:272)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:62)
	at io.quarkus.deployment.dev.IsolatedDevModeMain.firstStart(IsolatedDevModeMain.java:91)
	at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:430)
	at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:57)
	at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:138)
	at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:93)
	at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:131)
	at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:62)
Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkiverse.quinoa.deployment.QuinoaProcessor#install threw an exception: java.lang.RuntimeException: Error in Quinoa while running package manager install command: pnpm install
	at io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner.install(PackageManagerRunner.java:86)
	at io.quarkiverse.quinoa.deployment.QuinoaProcessor.install(QuinoaProcessor.java:145)
	at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733)
	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:856)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
	at java.base/java.lang.Thread.run(Thread.java:1583)
	at org.jboss.threads.JBossThread.run(JBossThread.java:483)

	at io.quarkus.builder.Execution.run(Execution.java:123)
	at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:79)
	at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:161)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:350)
	... 9 more
Caused by: java.lang.RuntimeException: Error in Quinoa while running package manager install command: pnpm install
	at io.quarkiverse.quinoa.deployment.packagemanager.PackageManagerRunner.install(PackageManagerRunner.java:86)
	at io.quarkiverse.quinoa.deployment.QuinoaProcessor.install(QuinoaProcessor.java:145)
	at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733)
	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:856)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
	at java.base/java.lang.Thread.run(Thread.java:1583)
	at org.jboss.threads.JBossThread.run(JBossThread.java:483)

Quinoa version

2.4.8

Quarkus version

3.14.4

Build / Runtime

Vite

Package Manager

PNPM

Steps to reproduce the behavior

just setup nvm and new quarkus project with quinoa

Expected behavior

Quarkus startup normally

@melloware
Copy link
Contributor

can you post your package.json here so I can see it?

@melloware
Copy link
Contributor

also do you have?

quarkus.quinoa.package-manager-install.pnpm-version=7.12.0

in your application.properties?

@DaiYuANg
Copy link
Author

can you post your package.json here so I can see it?

{
  "name": "webui",
  "private": true,
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "tsc -b && vite build",
    "lint": "eslint .",
    "preview": "vite preview"
  },
  "dependencies": {
    "react": "^18.3.1",
    "react-dom": "^18.3.1"
  },
  "devDependencies": {
    "@eslint/js": "^9.9.0",
    "@types/react": "^18.3.3",
    "@types/react-dom": "^18.3.0",
    "@vitejs/plugin-react-swc": "^3.5.0",
    "eslint": "^9.9.0",
    "eslint-plugin-react-hooks": "^5.1.0-rc.0",
    "eslint-plugin-react-refresh": "^0.4.9",
    "globals": "^15.9.0",
    "typescript": "^5.5.3",
    "typescript-eslint": "^8.0.1",
    "vite": "^5.4.1"
  },
  "packageManager": "pnpm@9.11.0"
}

Just a new vite project

@DaiYuANg
Copy link
Author

also do you have?

quarkus.quinoa.package-manager-install.pnpm-version=7.12.0

in your application.properties?

I set this on package.json

@melloware
Copy link
Contributor

Quinoa doesn't read the package JSON for the version it reads the application.properties quarkus.quinoa.package-manager-install.pnpm-version=9.11.0 can you try that

@melloware melloware added enhancement New feature or request and removed enhancement New feature or request labels Sep 23, 2024
@DaiYuANg
Copy link
Author

Quinoa doesn't read the package JSON for the version it reads the application.properties quarkus.quinoa.package-manager-install.pnpm-version=9.11.0 can you try that

quarkus:
  log:
    console:
      json: false
  datasource:
    jdbc: false
    devservices:
      enabled: true
  quinoa:
    package-manager-install:
      pnpm-version: 9.11.0

That does not work still log

sh: line 1: pnpm: command not found

@DaiYuANg
Copy link
Author

Quinoa doesn't read the package JSON for the version it reads the application.properties quarkus.quinoa.package-manager-install.pnpm-version=9.11.0 can you try that

quarkus:
  log:
    console:
      json: false
  datasource:
    jdbc: false
    devservices:
      enabled: true
  quinoa:
    package-manager-install:
      pnpm-version: 9.11.0

That does not work still log

sh: line 1: pnpm: command not found

And I make sure the pnpm command work at all shell(bash/sh/zsh)

@melloware
Copy link
Contributor

ok then its a bug.

@melloware melloware added the bug Something isn't working label Sep 23, 2024
@melloware
Copy link
Contributor

i am pretty sure our CI/CD tests already test this on Linux but something must be different.

@DaiYuANg
Copy link
Author

i am pretty sure our CI/CD tests already test this on Linux but something must be different.

May its nvm?

@melloware
Copy link
Contributor

can you try it without NVM?

@DaiYuANg
Copy link
Author

can you try it without NVM?

I remove nvm and using node install from system package manager (dnf) and its does work

@melloware
Copy link
Contributor

ok so NVM is interfering somehow. Not sure what Quinoa can do here?

@DaiYuANg
Copy link
Author

ok so NVM is interfering somehow. Not sure what Quinoa can do here?

Could we do something compatible for NVM.
Like find $NVM_DIR and using binary in NVM current node version?

@melloware
Copy link
Contributor

I will leave that as a question for @ia3andy

@melloware melloware added enhancement New feature or request and removed bug Something isn't working labels Sep 24, 2024
@melloware melloware changed the title On Linux environment pnpm command not found Node Version Manager: interferes with Quarkus and pnpm Sep 25, 2024
@melloware melloware changed the title Node Version Manager: interferes with Quarkus and pnpm Node Version Manager: interferes with Quinoa Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants