Skip to content

I am trying to install the package but facing the error can someone please point me in the right direction? #558

Description

@sKY02644

npm ERR! code 1
npm ERR! path D:\projects\nycmall\onlinesalesfrontend\node_modules\java
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@14.15.5 | win32 | x64
npm ERR! gyp info find Python using Python version 3.9.13 found at "C:\Users\vSky\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe"
npm ERR! gyp info find VS using VS2017 (15.9.28307.1401) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Users\vSky\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'C:\Users\vSky\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'msvs',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'D:\projects\nycmall\onlinesalesfrontend\node_modules\java\build\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\vSky\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\vSky\AppData\Local\node-gyp\Cache\14.15.5\include\node\common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=C:\Users\vSky\AppData\Local\node-gyp\Cache\14.15.5',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\Users\vSky\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\vSky\\AppData\\Local\\node-gyp\\Cache\\14.15.5\\<(target_arch)\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=D:\projects\nycmall\onlinesalesfrontend\node_modules\java',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'D:\projects\nycmall\onlinesalesfrontend\node_modules\java\build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! (node:39204) UnhandledPromiseRejectionWarning: TypeError [ERR_STREAM_NULL_VALUES]: May not write null values to stream
npm ERR! at Socket.Writable.write (internal/streams/writable.js:272:11)
npm ERR! at D:\projects\nycmall\onlinesalesfrontend\node_modules\java\findJavaHome.js:6:18
npm ERR! at D:\projects\nycmall\onlinesalesfrontend\node_modules\find-java-home\dist\index.js:103:21
npm ERR! at Object.next (D:\projects\nycmall\onlinesalesfrontend\node_modules\find-java-home\dist\index.js:27:53)
npm ERR! at fulfilled (D:\projects\nycmall\onlinesalesfrontend\node_modules\find-java-home\dist\index.js:18:58)
npm ERR! (Use node --trace-warnings ... to show where the warning was created)
npm ERR! (node:39204) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)npm ERR! (node:39204) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.npm ERR! gyp: Call to 'node findJavaHome.js' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: gyp failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (C:\Users\vSky\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:261:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:315:20)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
npm ERR! gyp ERR! System Windows_NT 10.0.22000
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\vSky\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd D:\projects\nycmall\onlinesalesfrontend\node_modules\java
npm ERR! gyp ERR! node -v v14.15.5
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\vSky\AppData\Local\npm-cache_logs\2022-05-30T17_01_22_379Z-debug-0.log

Activity

  1. divishav commented on Jun 1, 2022

    @divishav

    Facing a similar issue with oraclelinux8-openjdk11.0.15. When I try to run node findJavaHome.js it gives TypeError [ERR_STREAM_NULL_VALUES]: May not write null values to stream but $JAVA_HOME is set correctly and when I output $JAVA_HOME, I get the below path:
    /usr/lib/jvm/java-11-openjdk-11.0.15.0.10-2.el8_6.x86_64

    This works with oraclelinux8-openjdk11.0.14 but fails with oraclelinux8-openjdk11.0.15

    Any pointers would be highly appreciated

  2. divishav commented on Jun 1, 2022

    @divishav

    @sKY02644 ,
    Can you give the details like what version of java you have installed on your system, also what OS you are getting this issue?

  3. sKY02644 commented on Jun 1, 2022

    @sKY02644
    Author

    @divishav
    java version "1.8.0_321"
    Java(TM) SE Runtime Environment (build 1.8.0_321-b07)
    Java HotSpot(TM) 64-Bit Server VM (build 25.321-b07, mixed mode)

    Windows 11

  4. morph85 commented on Jun 10, 2022

    @morph85

    In my case i had "java" installed in rhel8 but not "javac" which require installing package ($ yum install java-devel).

  5. divishav commented on Jun 10, 2022

    @divishav

    Yeah it turns out it was similar issue for me. Javac was not present in the jdk so the installation was failing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions