无法安装ts-java

时间:2019-05-22 15:06:11

标签: node-modules

我正在尝试安装ts-java。安装时会显示一些错误。

在Windows Git Bash中,我尝试将ts-java安装为: $ npm install -g ts-java

记录了以下错误:

C:\Program Files\nodejs\ts-java.js -> C:\Program Files\nodejs\node_modules\ts-java\bin\ts-java.js
C:\Program Files\nodejs\ts-java -> C:\Program Files\nodejs\node_modules\ts-java\bin\ts-java.sh

 java@0.7.2 install C:\Program Files\nodejs\node_modules\ts-java\node_modules\java
 node-gyp rebuild


C:\Program Files\nodejs\node_modules\ts-java\node_modules\java>if not defined npm_config_node_gyp (node "C:\PROGRA~1\nvm\v10.15.3\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\PROGRA~1\nvm\v10.15.3\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Users\I41762\.windows-build-tools\python27", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\PROGRA~1\nvm\v10.15.3\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\PROGRA~1\nvm\v10.15.3\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack     at C:\PROGRA~1\nvm\v10.15.3\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:153:21)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\PROGRA~1\\nvm\\v10.15.3\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Program Files\nodejs\node_modules\ts-java\node_modules\java
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! java@0.7.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the java@0.7.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\I41762\AppData\Roaming\npm-cache\_logs\2019-05-22T14_51_43_337Z-debug.log

请帮助我安装ts-java

以下是npm日志的最后几行(AppData \ Roaming \ npm-cache_logs):

2033 silly install java@0.7.2
2034 info lifecycle java@0.7.2~install: java@0.7.2
2035 verbose lifecycle java@0.7.2~install: unsafe-perm in lifecycle true
2036 verbose lifecycle java@0.7.2~install: PATH: C:\PROGRA~1\nvm\v10.15.3\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Program Files\nodejs\node_modules\ts-java\node_modules\java\node_modules\.bin;C:\Program Files\nodejs\node_modules\ts-java\node_modules\.bin;C:\Program Files\nodejs\node_modules\.bin;C:\Users\testuser\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\testuser\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Docker\Docker\Resources\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0;C:\windows\System32\OpenSSH;C:\Program Files (x86)\WebEx\Productivity Tools;C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\nvm;C:\Program Files\nodejs;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\Yarn\bin;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\TortoiseGit\bin;C:\apache-maven-3.6.1\bin;C:\Users\testuser\.windows-build-tools\python27;C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\testuser\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\.bin;C:\Users\testuser\AppData\Roaming\npm\node_modules\.bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Docker\Docker\Resources\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0;C:\windows\System32\OpenSSH;C:\Program Files (x86)\WebEx\Productivity Tools;C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\nvm;C:\Program Files\nodejs;C:\ProgramData\chocolatey\bin;C:\Program Files\nodejs;C:\Program Files (x86)\Yarn\bin;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\TortoiseGit\bin;C:\Users\testuser\AppData\Local\Microsoft\WindowsApps;C:\Program Files\nvm;C:\Program Files\nodejs;C:\Users\testuser\AppData\Local\Yarn\bin;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
2037 verbose lifecycle java@0.7.2~install: CWD: C:\Program Files\nodejs\node_modules\ts-java\node_modules\java
2038 silly lifecycle java@0.7.2~install: Args: [ '/d /s /c', 'node-gyp rebuild' ]
2039 silly lifecycle java@0.7.2~install: Returned: code: 1  signal: null
2040 info lifecycle java@0.7.2~install: Failed to exec install script
2041 timing action:install Completed in 6541ms
2042 verbose unlock done using C:\Users\testuser\AppData\Roaming\npm-cache\_locks\staging-dfd8fbf9c1feea0f.lock for C:\Program Files\nodejs\node_modules\.staging
2043 timing stage:rollbackFailedOptional Completed in 2973ms
2044 timing stage:runTopLevelLifecycles Completed in 38761ms
2045 verbose stack Error: java@0.7.2 install: `node-gyp rebuild`
2045 verbose stack Exit status 1
2045 verbose stack     at EventEmitter.<anonymous> (C:\PROGRA~1\nvm\v10.15.3\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
2045 verbose stack     at EventEmitter.emit (events.js:189:13)
2045 verbose stack     at ChildProcess.<anonymous> (C:\PROGRA~1\nvm\v10.15.3\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
2045 verbose stack     at ChildProcess.emit (events.js:189:13)
2045 verbose stack     at maybeClose (internal/child_process.js:970:16)
2045 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
2046 verbose pkgid java@0.7.2
2047 verbose cwd D:\
2048 verbose Windows_NT 10.0.17134
2049 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ts-java"
2050 verbose node v10.15.3
2051 verbose npm  v6.4.1
2052 error code ELIFECYCLE
2053 error errno 1
2054 error java@0.7.2 install: `node-gyp rebuild`
2054 error Exit status 1
2055 error Failed at the java@0.7.2 install script.
2055 error This is probably not a problem with npm. There is likely additional logging output above.
2056 verbose exit [ 1, true ]

我在这里想念东西吗?

0 个答案:

没有答案