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

latest, 0.14, package on npmjs.org isn't 0.14 #593

Open
puzzle-it-nu opened this issue Feb 28, 2024 · 0 comments
Open

latest, 0.14, package on npmjs.org isn't 0.14 #593

puzzle-it-nu opened this issue Feb 28, 2024 · 0 comments

Comments

@puzzle-it-nu
Copy link

It looks like the code that is on npmjs.org for version tab v0.14.0 isn't what is here on github.
Running npm install java --ignore-scripts and checking the find_java_libdir.sh shows that its missing a crucial ^ character which causes problems when you have openjdk-17 installed. Line 26 is missing the caret character.
Forcing the v0.14.0 version from github in my package.json and using overrides : { "java": "$java" } } makes npm install work.

I see a lot of issues that might have this at the core of its problem.

For completeness my package.json

{
  "name": "jdbctest",
  "version": "1.0.0",
  "description": "",
  "exports": "./test-jdbc.js",
  "engines": {
    "node": ">=16"
  },
  "type": "module",
  "module": "es2022",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "dev": "ts-node test-jdbc.ts"
  },
  "keywords": [],
  "author": "Me",
  "license": "ISC",
  "dependencies": {
    "@types/node": "^20.11.21",
    "java": "github:joeferner/node-java#v0.14.0",
    "node-jdbc-driver": "^1.3.2",
    "nodejs-jdbc": "^0.1.4"
  },
  "devDependencies": {
    "ts-node": "^10.9.2",
    "typescript": "^5.3.3"
  },
  "overrides": {
    "java": "$java"
  }
}

Both node-jdbc-driver and nodejs-jdbc use node-java but the latter uses 0.14 and the former 0.12.1 from npmjs.org and both have problems being compiled by node-gyp.

With the above it compiles/installs with node-20

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